1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/abstract_controller
Mircea Pricop 021f3d24f3 Prevent conflict between mime types and Object methods
Assuming the type ":touch", Collector.new was calling
send(:touch), which instead of triggering method_missing
and generating a new collector method, actually
invoked the private method `touch` inherited from
Object.

By generating the method for each mime type as it
is registered, the private methods on Object can
never be reached by `send`, because the `Collector`
will have them before `send` is called on it.

To do this, a callback mechanism was added to Mime::Type

This allows someone to add a callback for whenever
a new mime type is registered. The callback then
gets called with the new mime as a parameter.

This is then used in AbstractController::Collector
to generate new collector methods after each mime
is registered.
2012-07-06 20:38:23 +02:00
..
railties Rely on a public contract between railties instead of accessing railtie methods directly. 2011-11-23 19:06:45 +00:00
asset_paths.rb avoid empty api pages 2012-04-08 01:56:41 +05:30
base.rb copy edit[ci skip] 2012-05-23 22:42:49 +05:30
callbacks.rb removing key argument from run_callbacks - fix build 2012-05-10 02:56:36 -05:00
collector.rb Prevent conflict between mime types and Object methods 2012-07-06 20:38:23 +02:00
helpers.rb i suck, fixing error message 2012-06-14 09:37:58 -07:00
layouts.rb Add instance_accessor option to class_attribute 2012-05-22 00:28:34 +04:00
logger.rb avoid empty api pages 2012-04-08 01:56:41 +05:30
rendering.rb remove AV.prepare and move all helper-related logic into the controller. this decouples the view since it no longer knows about routes internals. 2012-06-29 11:33:37 +02:00
translation.rb Move ActionController::Translation to AbstractController::Translation. 2010-01-20 15:02:13 +01:00
url_for.rb Clean up module docs [ci skip] 2012-03-07 01:04:14 +05:30
view_paths.rb Use Kernel#Array instead of Array.wrap in view_paths 2012-01-05 17:08:18 -03:00