diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-12 16:03:44 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-12 16:03:44 +0000 |
commit | de37f7df4f6bfe369598b2f92b07ce9c2c212e76 (patch) | |
tree | c1a4b5833b843580eb87db1221befba0e6ee8e24 /actionpack/lib/action_controller/base.rb | |
parent | 3a90c31a566ec3a818e5cc8f0c2dca58ad305c27 (diff) | |
download | rails-de37f7df4f6bfe369598b2f92b07ce9c2c212e76.tar.gz rails-de37f7df4f6bfe369598b2f92b07ce9c2c212e76.tar.bz2 rails-de37f7df4f6bfe369598b2f92b07ce9c2c212e76.zip |
Mime types are separated by a comma, not semicolon, in the Accept header. 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
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index c6c052ec56..4663828c96 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -271,7 +271,7 @@ module ActionController #:nodoc: # # Example of doing your own parser for a custom content type: # - # ActionController::Base.param_parsers['application/atom+xml'] = Proc.new do |data| + # ActionController::Base.param_parsers[Mime::Type.lookup('application/atom+xml')] = Proc.new do |data| # node = REXML::Document.new(post) # { node.root.name => node.root } # end @@ -281,10 +281,10 @@ module ActionController #:nodoc: # in params[:r][:name] for "David" instead of params[:name]. To get the old behavior, you can # re-register XmlSimple as application/xml handler and enable application/x-yaml like this: # - # ActionController::Base.param_parsers['application/xml'] = + # ActionController::Base.param_parsers[Mime::XML] = # Proc.new { |data| XmlSimple.xml_in(data, 'ForceArray' => false) } - # ActionController::Base.param_parsers['application/x-yaml'] = :yaml - @@param_parsers = { 'application/xml' => :xml_simple } + # ActionController::Base.param_parsers[Mime::YAML] = :yaml + @@param_parsers = { Mime::XML => :xml_simple } cattr_accessor :param_parsers # Template root determines the base from which template references will be made. So a call to render("test/template") |