From efe0348486aee9b19877e730a6a07db9c717f2f2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 5 Jan 2005 00:38:09 +0000 Subject: Added the possibility of passing nil to UrlHelper#link_to to use the link itself as the name git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@338 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/filters.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'actionpack/lib/action_controller/filters.rb') diff --git a/actionpack/lib/action_controller/filters.rb b/actionpack/lib/action_controller/filters.rb index bd5c545dfb..1691f031f8 100644 --- a/actionpack/lib/action_controller/filters.rb +++ b/actionpack/lib/action_controller/filters.rb @@ -130,15 +130,15 @@ module ActionController #:nodoc: # The passed filters will be appended to the array of filters that's run _before_ actions # on this controller are performed. def append_before_filter(*filters, &block) - filters << block if block_given? - append_filter_to_chain("before", filters) + filters << block if block_given? + append_filter_to_chain("before", filters) end # The passed filters will be prepended to the array of filters that's run _before_ actions # on this controller are performed. def prepend_before_filter(*filters, &block) - filters << block if block_given? - prepend_filter_to_chain("before", filters) + filters << block if block_given? + prepend_filter_to_chain("before", filters) end # Short-hand for append_before_filter since that's the most common of the two. @@ -147,15 +147,15 @@ module ActionController #:nodoc: # The passed filters will be appended to the array of filters that's run _after_ actions # on this controller are performed. def append_after_filter(*filters, &block) - filters << block if block_given? - append_filter_to_chain("after", filters) + filters << block if block_given? + append_filter_to_chain("after", filters) end # The passed filters will be prepended to the array of filters that's run _after_ actions # on this controller are performed. def prepend_after_filter(*filters, &block) - filters << block if block_given? - prepend_filter_to_chain("after", filters) + filters << block if block_given? + prepend_filter_to_chain("after", filters) end # Short-hand for append_after_filter since that's the most common of the two. -- cgit v1.2.3