diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-05 16:48:40 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-05 16:48:40 -0300 |
commit | 1a163dcc412e1e9adae3c788ad0462c592819d4b (patch) | |
tree | 59911ef1740515b44f0f6b083158d87ea016c810 /actionpack | |
parent | 3438f6ca7483cdabd341ae372b50b6a0e658b18a (diff) | |
download | rails-1a163dcc412e1e9adae3c788ad0462c592819d4b.tar.gz rails-1a163dcc412e1e9adae3c788ad0462c592819d4b.tar.bz2 rails-1a163dcc412e1e9adae3c788ad0462c592819d4b.zip |
Array.wrap is no longer needed in AbstractController::Callbacks
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/abstract_controller/callbacks.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb index 7004e607a1..fffe3edac2 100644 --- a/actionpack/lib/abstract_controller/callbacks.rb +++ b/actionpack/lib/abstract_controller/callbacks.rb @@ -167,7 +167,7 @@ module AbstractController # for details on the allowed parameters. def #{filter}_filter(*names, &blk) # def before_filter(*names, &blk) _insert_callbacks(names, blk) do |name, options| # _insert_callbacks(names, blk) do |name, options| - options[:if] = (Array.wrap(options[:if]) << "!halted") if #{filter == :after} # options[:if] = (Array.wrap(options[:if]) << "!halted") if false + options[:if] = (Array(options[:if]) << "!halted") if #{filter == :after} # options[:if] = (Array(options[:if]) << "!halted") if false set_callback(:process_action, :#{filter}, name, options) # set_callback(:process_action, :before, name, options) end # end end # end @@ -176,7 +176,7 @@ module AbstractController # for details on the allowed parameters. def prepend_#{filter}_filter(*names, &blk) # def prepend_before_filter(*names, &blk) _insert_callbacks(names, blk) do |name, options| # _insert_callbacks(names, blk) do |name, options| - options[:if] = (Array.wrap(options[:if]) << "!halted") if #{filter == :after} # options[:if] = (Array.wrap(options[:if]) << "!halted") if false + options[:if] = (Array(options[:if]) << "!halted") if #{filter == :after} # options[:if] = (Array(options[:if]) << "!halted") if false set_callback(:process_action, :#{filter}, name, options.merge(:prepend => true)) # set_callback(:process_action, :before, name, options.merge(:prepend => true)) end # end end # end |