diff options
author | José Valim <jose.valim@gmail.com> | 2010-11-11 17:07:06 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-11 17:07:06 +0100 |
commit | a8974028634a1ff5ecce46c1a79d305f58ba4338 (patch) | |
tree | 7441616e66d1a7e45b4a7747968a16ae458f8c42 | |
parent | 2bb1c202b48c4f1c8d81927fb3e5fc00806231f9 (diff) | |
download | rails-a8974028634a1ff5ecce46c1a79d305f58ba4338.tar.gz rails-a8974028634a1ff5ecce46c1a79d305f58ba4338.tar.bz2 rails-a8974028634a1ff5ecce46c1a79d305f58ba4338.zip |
Remove inline comment.
-rw-r--r-- | actionpack/lib/abstract_controller/callbacks.rb | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb index 094e62b9c7..f169ab7c3a 100644 --- a/actionpack/lib/abstract_controller/callbacks.rb +++ b/actionpack/lib/abstract_controller/callbacks.rb @@ -81,29 +81,29 @@ module AbstractController class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 # Append a before, after or around filter. See _insert_callbacks # 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} - set_callback(:process_action, :#{filter}, name, options) # set_callback(:process_action, :before_filter, name, options) - end # end - end # end + def #{filter}_filter(*names, &blk) + _insert_callbacks(names, blk) do |name, options| + options[:if] = (Array.wrap(options[:if]) << "!halted") if #{filter == :after} + set_callback(:process_action, :#{filter}, name, options) + end + end # Prepend a before, after or around filter. See _insert_callbacks # 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} - set_callback(:process_action, :#{filter}, name, options.merge(:prepend => true)) # set_callback(:process_action, :before, name, options.merge(:prepend => true)) - end # end - end # end + def prepend_#{filter}_filter(*names, &blk) + _insert_callbacks(names, blk) do |name, options| + options[:if] = (Array.wrap(options[:if]) << "!halted") if #{filter == :after} + set_callback(:process_action, :#{filter}, name, options.merge(:prepend => true)) + end + end # Skip a before, after or around filter. See _insert_callbacks # for details on the allowed parameters. - def skip_#{filter}_filter(*names, &blk) # def skip_before_filter(*names, &blk) - _insert_callbacks(names, blk) do |name, options| # _insert_callbacks(names, blk) do |name, options| - skip_callback(:process_action, :#{filter}, name, options) # skip_callback(:process_action, :before, name, options) - end # end - end # end + def skip_#{filter}_filter(*names, &blk) + _insert_callbacks(names, blk) do |name, options| + skip_callback(:process_action, :#{filter}, name, options) + end + end # *_filter is the same as append_*_filter alias_method :append_#{filter}_filter, :#{filter}_filter |