diff options
author | Evgeniy Dolzhenko <dolzenko@gmail.com> | 2011-09-25 13:03:01 +0100 |
---|---|---|
committer | Evgeniy Dolzhenko <dolzenko@gmail.com> | 2011-09-25 13:03:01 +0100 |
commit | 86cf3fb5faffa38a0337b4396926f53f8501e66f (patch) | |
tree | f0a74a65b66358d89a0b236c6e8f30bf658b5ecf /actionpack/lib | |
parent | 933ba0cf6e20a5fac72ece21e5b51fbe485b3d90 (diff) | |
download | rails-86cf3fb5faffa38a0337b4396926f53f8501e66f.tar.gz rails-86cf3fb5faffa38a0337b4396926f53f8501e66f.tar.bz2 rails-86cf3fb5faffa38a0337b4396926f53f8501e66f.zip |
Implement Mime::Type#respond_to? (consistently with #method_missing)
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/http/mime_type.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index fa2948c8db..8a9f9c4315 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -256,6 +256,10 @@ module Mime @@html_types.include?(to_sym) || @string =~ /html/ end + def respond_to?(method, include_private = false) #:nodoc: + super || method.to_s =~ /(\w+)\?$/ + end + private def method_missing(method, *args) if method.to_s =~ /(\w+)\?$/ |