diff options
author | Michael S. Klishin <michael@novemberain.com> | 2008-12-28 13:21:10 +0300 |
---|---|---|
committer | Michael S. Klishin <michael@novemberain.com> | 2008-12-28 13:21:10 +0300 |
commit | d77deb89d54b18c662ae3de103802e4d7a9d7d08 (patch) | |
tree | f5a77220f9057d3b998e1a2db8166ecc021e32cc /actionpack/lib | |
parent | 5da3ba12159d2c4fc0680efcf0cad8a31f725122 (diff) | |
download | rails-d77deb89d54b18c662ae3de103802e4d7a9d7d08.tar.gz rails-d77deb89d54b18c662ae3de103802e4d7a9d7d08.tar.bz2 rails-d77deb89d54b18c662ae3de103802e4d7a9d7d08.zip |
Annotated metaprogramming code across ActiveSupport
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/mime_responds.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/mime_responds.rb b/actionpack/lib/action_controller/mime_responds.rb index c41bd3ac4b..b2b73bbd57 100644 --- a/actionpack/lib/action_controller/mime_responds.rb +++ b/actionpack/lib/action_controller/mime_responds.rb @@ -144,13 +144,9 @@ module ActionController #:nodoc: def self.generate_method_for_mime(mime) sym = mime.is_a?(Symbol) ? mime : mime.to_sym const = sym.to_s.upcase - class_eval <<-RUBY + class_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{sym}(&block) # def html(&block) - if Mime::SET.include?(Mime::#{const}) # if Mime::Set.include?(Mime::HTML) - custom(Mime::#{const}, &block) # custom(Mime::HTML, &block) - else # else - super # super - end # end + custom(Mime::#{const}, &block) # custom(Mime::HTML, &block) end # end RUBY end |