aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/mime_type.rb
Commit message (Collapse)AuthorAgeFilesLines
* Ensure mime types can be compared with symbols. Closes #10796 [bscofield]Michael Koziarski2008-01-201-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8677 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Some mime type refactoring. Closes #9957 [Josh Peek]Jeremy Kemper2007-10-231-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8001 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Json related documentation for render and the AR serializer. Closes ↵Michael Koziarski2007-10-151-1/+1
| | | | | | #9814. Closes #9833. [chuyeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat, consistent load pathsJeremy Kemper2007-10-021-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that render :json will automatically call .to_json unless its being ↵David Heinemeier Hansson2007-09-201-2/+8
| | | | | | passed a string [DHH] Added Mime::Type.register_alias for dealing with different formats using the same mime type [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Random hits from the style naziDavid Heinemeier Hansson2007-09-091-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7438 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improved the handling of broken accept headersTobias Lütke2007-03-281-4/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6484 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Prefer MIME constants to strings. Closes #7707.Jeremy Kemper2007-03-061-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6350 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Mime::Type convenience methods to check the current mime type. [Rick]Rick Olson2007-02-151-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6152 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use a consistent load path to avoid double requires. Fix some scattered Ruby ↵Jeremy Kemper2007-01-281-1/+1
| | | | | | warnings. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Request#format to return the format used for the request as a mime ↵David Heinemeier Hansson2006-12-021-0/+4
| | | | | | 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
* Added the option for extension aliases to mime type registration [DHH] ↵David Heinemeier Hansson2006-12-021-65/+12
| | | | | | 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
* Added CSV to Mime::SET so that respond_to csv will workTobias Lütke2006-11-241-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added text/csv as a default mime type and included example on how to make ↵David Heinemeier Hansson2006-11-231-0/+5
| | | | | | your own in config/environment.rb [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5620 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Docs and deprecationDavid Heinemeier Hansson2006-09-031-1/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4953 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* respond_to .html now always renders #{action_name}.rhtml so that registered ↵Tobias Lütke2006-08-301-1/+1
| | | | | | | | | 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
* Added ICS to extension lookup recognition [Lars Pind]David Heinemeier Hansson2006-07-261-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4622 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make new mime types first class [DHH]David Heinemeier Hansson2006-06-021-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4407 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Mime::TEXT (text/plain) and Mime::ICS (text/calendar) as new default ↵David Heinemeier Hansson2006-06-021-0/+5
| | | | | | types [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Mime::Type.register(string, symbol, synonyms = []) for adding new ↵David Heinemeier Hansson2006-06-021-4/+12
| | | | | | custom mime types [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4405 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dont keep nothing as a lookup [DHH]David Heinemeier Hansson2006-06-011-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added interrogation of params[:format] to determine Accept type. If :format ↵David Heinemeier Hansson2006-05-311-0/+17
| | | | | | 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
* Fixed docsDavid Heinemeier Hansson2006-03-281-2/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4079 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make Mime::Type.parse consider q values (if any)Jamis Buck2006-03-181-13/+67
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3917 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Mime::Type#to_sym to do @string.to_sym. Add text/yaml as alias for ↵Jamis Buck2006-03-151-3/+5
| | | | | | Mime::YAML git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3873 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rendering xml shouldnt happen inside any layout. Added class proxying to ↵David Heinemeier Hansson2006-03-131-7/+29
| | | | | | RJS, so you can call page.field.clear("my_field") to generate Field.clear("my_field");. Added :content_type option to render, so you can change the content type on the fly. Do type/subtype reordering of Accept header preferences for xml types (aka make Firefox work with respond_to). CHANGED DEFAULT: The default content type for .rxml is now application/xml instead of type/xml, see http://www.xml.com/pub/a/2004/07/21/dive.html for reason git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Prepare for mime type reordering depending on the branch [DHH]David Heinemeier Hansson2006-03-121-1/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Default mime type for XML should be application/xml [DHH]David Heinemeier Hansson2006-03-121-13/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mime types are separated by a comma, not semicolon, in the Accept header. ↵David Heinemeier Hansson2006-03-121-2/+10
| | | | | | Also switch all internal configuration of mime types away from strings and over to Mime::Type [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added synonym and custom type handling to respond_to [DHH]David Heinemeier Hansson2006-03-121-26/+30
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Assume that we accept what we give [DHH]David Heinemeier Hansson2006-03-121-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added better support for using the same actions to output for different ↵David Heinemeier Hansson2006-03-111-0/+44
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