Commit Graph

898 Commits

Author SHA1 Message Date
Rick Olson
d2205ea5e9 Improve Test Coverage for ActionController::Routing::Route#matches_controller_and_action? (Heckle++) #7115 [Kevin Clark]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5976 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-17 06:49:43 +00:00
Rick Olson
582c028b14 Heckling ActionController::Resources::Resource revealed that set_prefixes didn't break when :name_prefix was munged. #7081 [Kevin Clark]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5974 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-17 06:46:02 +00:00
Rick Olson
4733182e56 Fix #distance_of_time_in_words to report accurately against the Duration class. #7114 [eventualbuddha]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5973 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-17 06:28:57 +00:00
Rick Olson
1ff84503b4 Refactor #form_tag to allow easy extending. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5972 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-17 06:25:30 +00:00
Sam Stephenson
9ec31ba741 Update to Prototype 1.5.0
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5970 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-17 05:01:29 +00:00
Jeremy Kemper
d38417fc02 RecordInvalid, RecordNotSaved => 422 Unprocessable Entity, StaleObjectError => 409 Conflict. References #7097.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5966 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-17 00:43:53 +00:00
Jamis Buck
b0a1aa7e7e Allow fields_for to be nested in form_for
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5965 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-17 00:04:02 +00:00
Tobias Lütke
64a80ef756 Allow inGroupsOf and eachSlice to be called through rjs. Closes #7046
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5942 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-15 15:11:29 +00:00
Jeremy Kemper
55efae2720 Allow exempt_from_layout :rhtml. References #6742, closes #7026.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5927 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-14 13:57:44 +00:00
Rick Olson
dd6826eba3 Recognize the .txt extension as Mime::TEXT [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-12 20:54:04 +00:00
Jeremy Kemper
41198ad3ad Fix parsing of array[] CGI parameters so extra empty values aren't included. Closes #6252.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5904 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-12 09:10:58 +00:00
Jeremy Kemper
fa619b051b link_to_unless_current works with full URLs as well as paths. Closes #6891.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-12 07:02:38 +00:00
Rick Olson
10d0fcd4ec Lookup the mime type for #auto_discovery_link_tag in the Mime::Type class. Closes #6941 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5874 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-08 04:09:24 +00:00
Rick Olson
0727af86fc Fix bug where nested resources ignore a parent singleton parent's path prefix. Closes #6940 [Dan Kubb]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-08 01:07:48 +00:00
Michael Koziarski
31fb0deec1 Fix no method error with error_messages_on. Closes #6935 [nik.wakelin Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5870 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-07 08:56:57 +00:00
Rick Olson
2228fdbbae Slight doc tweak to the ActionView::Helpers::PrototypeHelper#replace docs. Closes #6922 [Steven Bristol]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5863 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-05 20:59:31 +00:00
Rick Olson
b51727aa49 Slight doc tweak to #prepend_filter. Closes #6493 [Jeremy Voorhis]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-05 20:46:34 +00:00
Rick Olson
6c914d983e Add more extensive documentation to the AssetTagHelper. Closes #6452 [Bob Silva]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5859 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-05 20:42:03 +00:00
Rick Olson
730c8e8391 Clean up multiple calls to #stringify_keys in TagHelper, add better documentation and testing for TagHelper. Closes #6394 [Bob Silva]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5857 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-05 20:32:03 +00:00
Rick Olson
f1b45df49a [DOCS] fix reference to ActionController::Macros::AutoComplete for #text_field_with_auto_complete. Closes #2578 [Jan Prill]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5851 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-05 20:12:01 +00:00
Rick Olson
8219db5ee2 rollback [5833] and [5835]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-04 21:43:24 +00:00
Rick Olson
1023bc6e86 Allow ActionController::Base.session_store and #fragment_cache_store to lazily load the session class to allow for custom session store plugins. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5835 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-04 21:31:18 +00:00
Rick Olson
05aa57bc84 Allow ActionController::Base.session_store to lazily load the session class to allow for custom session store plugins. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5833 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-04 21:18:13 +00:00
Jamis Buck
b75f28edb4 Make sure html_document is reset between integration test requests (closes #6834)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5828 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-01 03:03:13 +00:00
Jeremy Kemper
0f048a5c98 Set session to an empty hash if :new_session => false and no session cookie or param is present. CGI::Session was raising an unrescued ArgumentError.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5820 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-01 01:13:09 +00:00
Jeremy Kemper
f9f84d9f6d Routing uses URI escaping for path components and CGI escaping for query parameters.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5803 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-28 21:04:44 +00:00
Rick Olson
ef1232c478 forgot to save CHANGELOG
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5786 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-25 09:35:20 +00:00
Jeremy Kemper
68d2926ab0 Singleton resources: POST /singleton => create, GET /singleton/new => new
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-22 03:16:50 +00:00
Jeremy Kemper
a1ca37ec86 Use 400 Bad Request status for unrescued ActiveRecord::RecordInvalid exceptions.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-22 00:27:39 +00:00
Jeremy Kemper
9a27b29755 Silence log_error deprecation warnings from inspecting deprecated instance variables.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5757 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-19 23:16:10 +00:00
Jeremy Kemper
e56bd3a121 Only cache GET requests with a 200 OK response. Closes #6514, #6743.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5755 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-19 20:25:52 +00:00
Jamis Buck
33e48d5f97 Add a 'referer' attribute to TestRequest
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-19 17:11:26 +00:00
Rick Olson
e7c2c7982f Ensure render :json => ... skips the layout. Closes #6808 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-19 04:41:57 +00:00
Rick Olson
d833645cd8 Fix HTML::Node to output double quotes instead of single quotes. Closes #6845 [mitreandy]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-14 20:56:03 +00:00
Jeremy Kemper
2f184c338b Correctly report which filter halted the chain. References #6699.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-12 22:26:37 +00:00
Nicholas Seckar
d1a2449220 Fix a bug in Routing where a parameter taken from the path of the current request could not be used as a query parameter for the next. Closes #6752.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5709 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-09 04:42:32 +00:00
Jeremy Kemper
a454dcf012 Unrescued ActiveRecord::RecordNotFound responds with 404 instead of 500.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-08 22:19:00 +00:00
Tobias Lütke
2f9d44e50b Improved auto_link to match more valid urls correctly
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5704 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-07 22:12:48 +00:00
Rick Olson
d0fa4d3e33 Add singleton resources. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5701 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-07 15:36:08 +00:00
Jeremy Kemper
189ecafa53 Update changelog to reflect application/json content type.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5696 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-06 23:10:58 +00:00
Jeremy Kemper
42596543dc respond_to recognizes JSON. render :json => @person.to_json automatically sets the content type and takes a :callback option to specify a client-side function to call using the rendered JSON as an argument. References #4185.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5694 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-06 22:27:08 +00:00
Jeremy Kemper
07423bed4b Bob's raining patches: fixes date_helper bugs and usability issues. References #3811.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-06 19:15:24 +00:00
David Heinemeier Hansson
2794f4164f Dropped the idea of automatically routing :format for the vanilla routes -- that will be a treat for map.resources. Deprecated the name route root as it'll be used as a shortcut for map.connect '' in Rails 2.0 (Rails 1.2). Added map.root as an alias for map.connect '' (Rails 2.0)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-04 00:12:00 +00:00
David Heinemeier Hansson
7611fa6d46 Added Request#format to return the format used for the request as a mime type. If no format is specified, the first Request#accepts type is used. This means you can stop using respond_to for anything else than responses [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-02 23:07:04 +00:00
David Heinemeier Hansson
5410f2cb74 Added the option for extension aliases to mime type registration [DHH] Refactored default mime types to use the extension framework instead of just declaring themselves verbosely
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-02 22:48:20 +00:00
Jeremy Kemper
13e1d295d6 @response.redirect_url works with 201 Created responses: just return headers['Location'] rather than checking the response status.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5643 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-28 23:25:00 +00:00
Jeremy Kemper
1d564d97c5 strip_tags passes through blank args such as nil or "". Closes #6702, references #2229.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-26 01:00:10 +00:00
Tobias Lütke
ad62d461e8 Added CSV to Mime::SET so that respond_to csv will work
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-24 16:35:00 +00:00
David Heinemeier Hansson
7c7d58937b Fixed that HEAD should return the proper Content-Length header (that is, actually use @body.size, not just 0) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5622 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-23 23:52:25 +00:00
David Heinemeier Hansson
efd0bdd9ea * Added GET-masquarading for HEAD, so request.method will return :get even for HEADs. This will help anyone relying on case request.method to automatically work with HEAD and map.resources will also allow HEADs to all GET actions. Rails automatically throws away the response content in a reply to HEAD, so you dont even need to worry about that. If you, for whatever reason, still need to distinguish between GET and HEAD in some edge case, you can use Request#head? and even Request.headers["REQUEST_METHOD"] for get the "real" answer. Closes #6694 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5621 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-23 23:24:47 +00:00