aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/mime_type.rb
diff options
context:
space:
mode:
authorGrzegorz Świrski <sognat@gmail.com>2013-04-01 15:06:36 +0200
committerAndrew White <andyw@pixeltrix.co.uk>2013-04-10 08:13:16 +0100
commitd50df2f116bfb1f3e897746fb345a5e945650e31 (patch)
tree839ab496404e012619b28c3180b28ff3ecd4f7d7 /actionpack/lib/action_dispatch/http/mime_type.rb
parent17a886b2759cb70ecebd174adeeac14e29bb8a11 (diff)
downloadrails-d50df2f116bfb1f3e897746fb345a5e945650e31.tar.gz
rails-d50df2f116bfb1f3e897746fb345a5e945650e31.tar.bz2
rails-d50df2f116bfb1f3e897746fb345a5e945650e31.zip
Reverts rendering behavior when format is unknown
If a request has unknown format (eg. /foo.bar), the renderer fallbacks to default format. This patch reverts Rails 3.2 behavior after c2267db commit. Fixes issue #9654.
Diffstat (limited to 'actionpack/lib/action_dispatch/http/mime_type.rb')
-rw-r--r--actionpack/lib/action_dispatch/http/mime_type.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb
index 049840e2e1..c24c9a1bc3 100644
--- a/actionpack/lib/action_dispatch/http/mime_type.rb
+++ b/actionpack/lib/action_dispatch/http/mime_type.rb
@@ -306,12 +306,16 @@ module Mime
method.to_s.ends_with? '?'
end
end
-
+
class NullType
def nil?
true
end
+ def respond_to_missing?(method, include_private = false)
+ method.to_s.ends_with? '?'
+ end
+
private
def method_missing(method, *args)
false if method.to_s.ends_with? '?'