Commit Graph

794 Commits

Author SHA1 Message Date
David Heinemeier Hansson
bf6d4cede7 Added user/password options for url_for to add http authentication in a URL [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6302 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-03 22:19:54 +00:00
David Heinemeier Hansson
1dc56ba481 Fixed that FormTagHelper#text_area_tag should disregard :size option if it's not a string [Brendon Davidson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6300 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-03 18:04:44 +00:00
Jeremy Kemper
f254831e83 Cookie store: use OpenSSL::HMAC instead of basic hash. Introduce :secret block and :digest option.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6296 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-03 13:54:54 +00:00
Jeremy Kemper
a0563bf7b0 Cookie store: test that >4K raises CookieOverflow and that unverifiable cookies are automatically deleted.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6294 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-03 08:18:30 +00:00
Jamis Buck
b1ff3b48e2 Set the original button value in an attribute of the button when using the :disable_with key with submit_tag
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-28 22:18:50 +00:00
Jeremy Kemper
df7ca38d7d session_enabled? works with session :off. Closes #6680.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6253 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-27 06:36:25 +00:00
David Heinemeier Hansson
b8cd80550f Added :port and :host handling to UrlRewriter (which unified url_for usage, regardless of whether it's called in view or controller) #7616 [alancfrancis]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-25 20:22:09 +00:00
David Heinemeier Hansson
9b46f69381 Allow send_file/send_data to use a registered mime type as the :type parameter #7620 [jonathan]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-25 20:16:58 +00:00
David Heinemeier Hansson
784298008b Allow routing requirements on map.resource(s) (closes #7633) [quixoten]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6232 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-25 20:13:19 +00:00
David Heinemeier Hansson
b203b9b55b Fixed broken test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6231 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-25 20:11:18 +00:00
David Heinemeier Hansson
793c9ff68d Moved perform_caching test set up into test's setup to fix a dependence fragility (closes #7640)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-25 19:53:14 +00:00
Jeremy Kemper
781985f7f2 Cookie session store: empty and unchanged sessions don't write a cookie.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-25 16:35:24 +00:00
David Heinemeier Hansson
f95dfff966 Added helper(:all) as a way to include all helpers from app/helpers/**/*.rb in ApplicationController [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-24 20:31:34 +00:00
Jeremy Kemper
236fe10fe9 Integration tests: introduce methods for other HTTP methods. Closes #6353.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6203 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-22 09:28:10 +00:00
Jeremy Kemper
c8f7860d50 CGI escape the session cookie.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6200 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-22 01:17:28 +00:00
David Heinemeier Hansson
9b854c22b1 Added subdirectory test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-21 15:58:42 +00:00
David Heinemeier Hansson
7f55931f80 Make sure that the filesystem is not involved with asset hosting
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6187 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-21 15:28:37 +00:00
Jeremy Kemper
de0a0d700e Routing: better support for escaped values in route segments. Closes #7544.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6185 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-21 10:05:07 +00:00
Jeremy Kemper
f29857690f Introduce a cookie-based session store as the Rails default. Sessions typically contain at most a user_id and flash message; both fit within the 4K cookie size limit. A secure hash is included with the cookie to ensure data integrity (a user cannot alter his user_id without knowing the secret key included in the hash). If you have more than 4K of session data or don't want your data to be visible to the user, pick another session store. Cookie-based sessions are dramatically faster than the alternatives.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6184 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-21 09:17:38 +00:00
David Heinemeier Hansson
21187c0fb4 Apply the rest of Chads patch
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-21 00:29:44 +00:00
David Heinemeier Hansson
e105653066 Added .erb and .builder as preferred aliases to the now deprecated .rhtml and .rxml extensions [Chad Fowler]. This is done to separate the renderer from the mime type. .erb templates are often used to render emails, atom, csv, whatever. So labeling them .rhtml doesn't make too much sense. The same goes for .rxml, which can be used to build everything from HTML to Atom to whatever. .rhtml and .rxml will continue to work until Rails 3.0, though. So this is a slow phasing out. All generators and examples will start using the new aliases, though.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-20 22:09:12 +00:00
David Heinemeier Hansson
9e4c8b8858 Fix tests depending too deep
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-19 02:25:01 +00:00
David Heinemeier Hansson
94fa0ed053 Its ETag not Etag
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-19 02:10:19 +00:00
David Heinemeier Hansson
7ec0204ecd Move etagging down to response, so renders with layouts dont screw it up [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6165 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-19 00:27:19 +00:00
David Heinemeier Hansson
aad7fbde68 Added caching option to AssetTagHelper#stylesheet_link_tag and AssetTagHelper#javascript_include_tag [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6164 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-18 23:54:20 +00:00
David Heinemeier Hansson
109d4ac954 Allow people to set their own etags, if they want more control over the process (closes #7580) []
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6163 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-18 16:32:05 +00:00
Jeremy Kemper
c9260c556c Add request protocol to asset host if not given. Prefer setting asset host as hostname only, no request protocol.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6162 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-18 07:23:57 +00:00
Jeremy Kemper
90c1207c38 Work around the two connection per host browser limit: use asset%d.myapp.com to distribute asset requests among asset[0123].myapp.com. Use a DNS wildcard or CNAMEs to map these hosts to your asset server. See http://www.die.net/musings/page_load_time/ for background.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6161 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-18 06:44:20 +00:00
Jeremy Kemper
4fd84aae90 Etagging ignores appended and block responses.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6160 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-18 00:47:18 +00:00
David Heinemeier Hansson
2e55095f6f Added that rendering will automatically insert the etag header on 200 OK responses. The etag is calculated using MD5 of the response body. If a request comes in that has a matching etag, the response will be changed to a 304 Not Modified and the response body will be set to an empty string. [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6158 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-17 18:16:44 +00:00
Rick Olson
e312cc3215 remove Mime::PLAIN from tests so its not confused with the default Mime::TEXT mime type
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6153 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-15 16:40:38 +00:00
Rick Olson
5d54b8f07c Add Mime::Type convenience methods to check the current mime type. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6152 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-15 16:25:46 +00:00
Jeremy Kemper
eb2dad2fe5 Revert [6086] and [6087] since they caused a major regression with functional tests in 1.2.2. References #7372.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6145 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-10 03:55:12 +00:00
Thomas Fuchs
c9108f3e39 Add a :url_based_filename => true option to ActionController::Streaming::send_file, which allows URL-based filenames. [Thomas Fuchs]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-09 11:25:37 +00:00
David Heinemeier Hansson
06b1198736 Fix that FormTagHelper#submit_tag using :disable_with should trigger the onsubmit handler of its form if available [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6134 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-06 17:48:38 +00:00
Rick Olson
92195e68a0 Fix issue with deprecation messing up #template_root= usage. Add #prepend_view_path and #append_view_path to allow modification of a copy of the
superclass' view_paths.  [Rick]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6125 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-04 22:27:45 +00:00
Rick Olson
69b0e5c44a Allow Controllers to have multiple view_paths instead of a single template_root. Closes #2754 [John Long]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6120 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-04 20:47:05 +00:00
David Heinemeier Hansson
8f614a80e7 Fix gem deprecation warnings, which also means depending on RubyGems 0.9.0+ [Chad Fowler]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6119 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-04 20:44:45 +00:00
Rick Olson
19fbb31464 Add much-needed html-scanner tests. Fixed CDATA parsing bug. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6117 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-04 20:04:40 +00:00
Rick Olson
7a49cb058f fix form_for example in ActionController::Resources documentation. Closes #7362 [gnarg], Added enhanced docs to routing assertions. Closes #7359 [Rob Sanheim], improve error message for Routing for named routes. Closes #7346 [Rob Sanheim]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-04 19:07:08 +00:00
David Heinemeier Hansson
6b5238aade Added FormBuilder#submit as a delegate for FormTagHelper#submit_tag [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-29 20:42:46 +00:00
Jeremy Kemper
09c708981c TestSession supports indifferent access so session['foo'] == session[:foo] in your tests. Closes #7372.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6086 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 18:24:46 +00:00
Nicholas Seckar
2cc9c8135c Allow Routes to generate all urls for a set of options by specifying :generate_all => true. References #1739.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6082 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 17:29:51 +00:00
Nicholas Seckar
17a9405b58 Change the query parser to map empty GET params to "" rather than nil. Closes #5694.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 17:00:17 +00:00
Jeremy Kemper
d6d94c7377 date_select and datetime_select take a :default option. Closes #7052.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6080 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 16:44:44 +00:00
Jeremy Kemper
ad29870c21 select :multiple => true suffixes the attribute name with [] unless already suffixed. Closes #6977.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6078 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 16:17:55 +00:00
Jeremy Kemper
dad60e7801 mail_to :encode => 'hex' also encodes the mailto: part of the href attribute as well as the linked email when no name is given. Closes #2061.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6070 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 14:16:25 +00:00
Jeremy Kemper
799f556fe1 Resource member routes require :id, eliminating the ambiguous overlap with collection routes. Closes #7229.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6062 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 08:20:04 +00:00
Jeremy Kemper
0eacdcf9a3 Use a consistent load path to avoid double requires. Fix some scattered Ruby warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 07:16:55 +00:00
Jeremy Kemper
4ac332fa9a Fix Test::Unit::TestCase#clean_backtrace
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6056 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 07:10:35 +00:00