aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/base/flash.rb
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-06-17 16:14:05 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-06-17 16:14:05 -0700
commit8fdf3d7890d2e58508e028c93d3797f21a774dbc (patch)
tree4eff185e19bd63161ad15fb47120f53e93debcf5 /actionpack/lib/action_controller/base/flash.rb
parent251a6e492c72d8aea713b7dabd245d68301e455d (diff)
downloadrails-8fdf3d7890d2e58508e028c93d3797f21a774dbc.tar.gz
rails-8fdf3d7890d2e58508e028c93d3797f21a774dbc.tar.bz2
rails-8fdf3d7890d2e58508e028c93d3797f21a774dbc.zip
Remove some defined?(Http) checks
Diffstat (limited to 'actionpack/lib/action_controller/base/flash.rb')
-rw-r--r--actionpack/lib/action_controller/base/flash.rb27
1 files changed, 2 insertions, 25 deletions
diff --git a/actionpack/lib/action_controller/base/flash.rb b/actionpack/lib/action_controller/base/flash.rb
index 42c6e430ca..cac14175d9 100644
--- a/actionpack/lib/action_controller/base/flash.rb
+++ b/actionpack/lib/action_controller/base/flash.rb
@@ -33,14 +33,7 @@ module ActionController #:nodoc:
included do
# TODO : Remove the defined? check when new base is the main base
- if defined?(ActionController::Http)
- include InstanceMethodsForNewBase
- else
- include InstanceMethodsForBase
-
- alias_method_chain :perform_action, :flash
- alias_method_chain :reset_session, :flash
- end
+ include InstanceMethods
end
class FlashNow #:nodoc:
@@ -148,23 +141,7 @@ module ActionController #:nodoc:
end
end
- module InstanceMethodsForBase #:nodoc:
- protected
- def perform_action_with_flash
- perform_action_without_flash
- if defined? @_flash
- @_flash.store(session)
- remove_instance_variable(:@_flash)
- end
- end
-
- def reset_session_with_flash
- reset_session_without_flash
- remove_instance_variable(:@_flash) if defined?(@_flash)
- end
- end
-
- module InstanceMethodsForNewBase #:nodoc:
+ module InstanceMethods #:nodoc:
protected
def process_action(method_name)
super