diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-05-25 18:05:58 +0200 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-05-25 18:09:12 +0200 |
commit | 10085114ce7ec6bc967fa701c49ef218f666efb5 (patch) | |
tree | 865841b3f014024f5f8b8cc44462aca699b6eff1 /actionpack/lib/action_controller/new_base | |
parent | 9cda410d818353a5c27cbd5df754f1d1e290927d (diff) | |
download | rails-10085114ce7ec6bc967fa701c49ef218f666efb5.tar.gz rails-10085114ce7ec6bc967fa701c49ef218f666efb5.tar.bz2 rails-10085114ce7ec6bc967fa701c49ef218f666efb5.zip |
Make Filter#filter work with around filters
Diffstat (limited to 'actionpack/lib/action_controller/new_base')
-rw-r--r-- | actionpack/lib/action_controller/new_base/compatibility.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/new_base/testing.rb | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/new_base/compatibility.rb b/actionpack/lib/action_controller/new_base/compatibility.rb index b3190486e8..4245ba982b 100644 --- a/actionpack/lib/action_controller/new_base/compatibility.rb +++ b/actionpack/lib/action_controller/new_base/compatibility.rb @@ -83,7 +83,7 @@ module ActionController @@cache_store = ActiveSupport::Cache.lookup_store(store_option) end end - + def initialize(*) super @template = _action_view diff --git a/actionpack/lib/action_controller/new_base/testing.rb b/actionpack/lib/action_controller/new_base/testing.rb index d8c3421587..78051a6252 100644 --- a/actionpack/lib/action_controller/new_base/testing.rb +++ b/actionpack/lib/action_controller/new_base/testing.rb @@ -1,5 +1,6 @@ module ActionController module Testing + extend ActiveSupport::DependencyModule # OMG MEGA HAX def process_with_new_base_test(request, response) @@ -26,5 +27,12 @@ module ActionController @_response ||= ActionDispatch::Response.new @_response.headers.replace(new_headers) end + + module ClassMethods + def before_filters + _process_action_callbacks.find_all{|x| x.kind == :before}.map{|x| x.name} + end + end + end end |