aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/filters.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-10-02 05:32:14 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-10-02 05:32:14 +0000
commit0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a (patch)
tree5778378eafcbdfa37c82c67be1566c76aca249be /actionpack/lib/action_controller/filters.rb
parent9264bdc8f618344307f07790a07a60dc04b80434 (diff)
downloadrails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.tar.gz
rails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.tar.bz2
rails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.zip
Ruby 1.9 compat, consistent load paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/filters.rb')
-rw-r--r--actionpack/lib/action_controller/filters.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/filters.rb b/actionpack/lib/action_controller/filters.rb
index 03b65074f4..c8ad922346 100644
--- a/actionpack/lib/action_controller/filters.rb
+++ b/actionpack/lib/action_controller/filters.rb
@@ -1,8 +1,10 @@
module ActionController #:nodoc:
module Filters #:nodoc:
def self.included(base)
- base.extend(ClassMethods)
- base.send(:include, ActionController::Filters::InstanceMethods)
+ base.class_eval do
+ extend ClassMethods
+ include ActionController::Filters::InstanceMethods
+ end
end
# Filters enable controllers to run shared pre and post processing code for its actions. These filters can be used to do
@@ -440,7 +442,7 @@ module ActionController #:nodoc:
def run(controller)
# only filters returning false are halted.
if false == @filter.call(controller)
- controller.send :halt_filter_chain, @filter, :returned_false
+ controller.send! :halt_filter_chain, @filter, :returned_false
end
end
@@ -466,7 +468,7 @@ module ActionController #:nodoc:
class SymbolFilter < Filter #:nodoc:
def call(controller, &block)
- controller.send(@filter, &block)
+ controller.send!(@filter, &block)
end
end
@@ -656,7 +658,7 @@ module ActionController #:nodoc:
return filter unless filter_responds_to_before_and_after(filter)
Proc.new do |controller, action|
if filter.before(controller) == false
- controller.send :halt_filter_chain, filter, :returned_false
+ controller.send! :halt_filter_chain, filter, :returned_false
else
begin
action.call
@@ -754,4 +756,4 @@ module ActionController #:nodoc:
end
end
end
-end \ No newline at end of file
+end