diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/mime_type.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/mime_type.rb b/actionpack/lib/action_controller/mime_type.rb index ba46f98ace..35095dc770 100644 --- a/actionpack/lib/action_controller/mime_type.rb +++ b/actionpack/lib/action_controller/mime_type.rb @@ -42,7 +42,7 @@ module Mime end def to_sym - @symbol || to_sym + @symbol || @string.to_sym end def ===(list) @@ -64,7 +64,7 @@ module Mime XML = Type.new "application/xml", :xml, %w( text/xml application/x-xml ) RSS = Type.new "application/rss+xml", :rss ATOM = Type.new "application/atom+xml", :atom - YAML = Type.new "application/x-yaml", :yaml + YAML = Type.new "application/x-yaml", :yaml, %w( text/yaml ) LOOKUP = Hash.new { |h, k| h[k] = Type.new(k) } @@ -81,7 +81,9 @@ module Mime LOOKUP["application/javascript"] = JS LOOKUP["application/x-javascript"] = JS + LOOKUP["text/yaml"] = YAML + LOOKUP["application/x-yaml"] = YAML + LOOKUP["application/rss+xml"] = RSS LOOKUP["application/atom+xml"] = ATOM - LOOKUP["application/x-yaml"] = YAML end
\ No newline at end of file |