1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

30 commits

Author SHA1 Message Date
Pratik Naik
011e469410 Make MimeResponds::Responder#any work without explicit types. Closes #11140 [jaw6]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8987 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-07 11:17:05 +00:00
Marcel Molina
2f254137e2 Make documentation comment for mime responders match documentation example. Closes #9357 [yon]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8027 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-26 03:25:40 +00:00
Jeremy Kemper
562b398fd7 Some mime type refactoring. Closes #9957 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8001 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-23 06:33:28 +00:00
Jeremy Kemper
0ee1cb2cd3 Ruby 1.9 compat, consistent load paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-02 05:32:14 +00:00
David Heinemeier Hansson
8e067b0b44 Fixed that a response has to be available for that exact mime type for it to be called (otherwise 406 should occur)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-29 21:56:21 +00:00
David Heinemeier Hansson
ff9ca2ca1e Random hits from the style nazi
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7438 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-09 23:12:57 +00:00
Jeremy Kemper
672941decb Introduce a default respond_to block for custom types. Closes #8174.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6856 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-26 03:11:34 +00:00
Rick Olson
6351e0a541 The default respond_to blocks don't set a specific extension anymore, so that both 'show.rjs' and 'show.js.rjs' will work. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6517 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-12 20:25:32 +00:00
Rick Olson
e0f8342676 Change default respond_to templates for xml and rjs formats. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6507 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-08 17:16:36 +00:00
Jeremy Kemper
7ea86773a9 r5515@ks: jeremy | 2006-10-08 13:24:42 -0700
#6281
 r5516@ks:  jeremy | 2006-10-08 13:29:49 -0700
 respond_to :html doesn't assume .rhtml. Closes #6281.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5232 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-08 20:30:24 +00:00
David Heinemeier Hansson
d137281d25 Just use the vanilla mime type string, no need for fancy lookups [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-20 20:02:41 +00:00
David Heinemeier Hansson
caa8a00520 Added that respond_to blocks will automatically set the content type to be the same as is requested [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5131 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-17 18:10:25 +00:00
David Heinemeier Hansson
8ca3f34db1 Docs and deprecation
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4953 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-03 23:28:54 +00:00
Tobias Lütke
ff063d700d respond_to .html now always renders #{action_name}.rhtml so that registered custom template handlers do not override it in priority.
Custom mime types require a block and throw proper error now.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4860 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-30 00:34:36 +00:00
Marcel Molina
2ac4839050 Update respond_to docs to follow established naming convention
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4759 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-14 14:33:40 +00:00
Michael Koziarski
6c50597489 Short documentation to mention use of Mime::Type.register. Closes #5710 [choonkeat@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4665 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-05 02:00:04 +00:00
David Heinemeier Hansson
f780bb8f58 Doc fix (closes #5576)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4541 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 01:16:41 +00:00
David Heinemeier Hansson
6dea52c54e Finish custom handling [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4409 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-02 04:38:28 +00:00
David Heinemeier Hansson
180edf4146 Make new mime types first class [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4408 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-02 04:30:43 +00:00
David Heinemeier Hansson
5e998d1ea0 Make new mime types first class [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4407 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-02 04:29:34 +00:00
David Heinemeier Hansson
f9cd92f4ee Added interrogation of params[:format] to determine Accept type. If :format is specified and matches a declared extension, like "rss" or "xml", that mime type will be put in front of the accept handler. This means you can link to the same action from different extensions and use that fact to determine output [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-31 18:52:24 +00:00
Marcel Molina
f28d619534 Add documentation for respond_to
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-28 03:39:23 +00:00
David Heinemeier Hansson
cc6e8ae57a Removed XML argument style for respond_to, so type.xml(object.to_xml) no longer works -- it wasnt worth the exception
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3944 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 21:17:14 +00:00
David Heinemeier Hansson
9840dc84f1 Allow for respond_to(:html, :js, :xml) (closes #4277) [Caio Chassot]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3919 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 06:43:37 +00:00
Jamis Buck
2429074075 Underscore dasherized keys in formatted requests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3878 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-15 21:46:41 +00:00
Jamis Buck
6480d49749 Add MimeResponds::Responder#any for managing multiple types with identical responses
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3876 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-15 18:27:26 +00:00
David Heinemeier Hansson
7af12d04ce Added synonym and custom type handling to respond_to [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 06:02:44 +00:00
David Heinemeier Hansson
de660957a5 Added defaults to respond_to [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3842 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 03:39:58 +00:00
David Heinemeier Hansson
6e3e5cadfb Added option to render action/template/file of a specific extension (and here by template type). This means you can have multiple templates with the same name but a different extension [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3841 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 01:56:55 +00:00
David Heinemeier Hansson
1c16649b48 Added better support for using the same actions to output for different sources depending on the Accept header [DHH] Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-11 01:23:29 +00:00