diff options
author | Ben McRedmond <ben@benmcredmond.com> | 2013-01-02 11:53:37 +0000 |
---|---|---|
committer | Ben McRedmond <ben@benmcredmond.com> | 2013-04-04 11:45:13 -0700 |
commit | e377228342e0185ef77ad8a58a8df4ece1683e80 (patch) | |
tree | 64c5372487561d5018f9a189c0f6c1b25ff083f8 /activemodel | |
parent | e456ad514aca81cbcb67ea9d919730ac00724a38 (diff) | |
download | rails-e377228342e0185ef77ad8a58a8df4ece1683e80.tar.gz rails-e377228342e0185ef77ad8a58a8df4ece1683e80.tar.bz2 rails-e377228342e0185ef77ad8a58a8df4ece1683e80.zip |
Fixes skipping object callback filters
This allows you to skip callbacks that are defined by objects, e.g. for
`ActionController`:
skip_after_filter MySpecialFilter
Previously this didn't work due to a bug in how Rails compared callbacks
in `Callback#matches?`. When a callback is compiled, if it's an object
filter (i.e. not a method, proc, etc.), `Callback` now defines a method on
`@klass` that is derived from the class name rather than `@callback_id`.
So, when `skip_callback` tries to find the appropriate callback to
remove, `Callback` can regenerate the method name for the filter
object and return the correct value for `Callback#matches?`.
Diffstat (limited to 'activemodel')
0 files changed, 0 insertions, 0 deletions