diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-24 04:47:40 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-24 04:47:40 +0000 |
commit | 4c2920e89c563f9e5e9c79c7da7d226cdddcc859 (patch) | |
tree | ec7387332e61dbd6564edd7ccc26822fc4c4d9bd | |
parent | a2c9c92b720cb66211e75adec178ac46e3cd7d92 (diff) | |
download | rails-4c2920e89c563f9e5e9c79c7da7d226cdddcc859.tar.gz rails-4c2920e89c563f9e5e9c79c7da7d226cdddcc859.tar.bz2 rails-4c2920e89c563f9e5e9c79c7da7d226cdddcc859.zip |
Remove unnecessary returns from builtin filters since render/return is now sufficient. Closes #9952 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/lib/action_controller/filters.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_controller/http_authentication.rb | 5 | ||||
-rw-r--r-- | actionpack/lib/action_controller/verification.rb | 3 | ||||
-rw-r--r-- | actionpack/test/controller/flash_test.rb | 1 |
4 files changed, 1 insertions, 9 deletions
diff --git a/actionpack/lib/action_controller/filters.rb b/actionpack/lib/action_controller/filters.rb index 6ec1ec1672..d7fb276171 100644 --- a/actionpack/lib/action_controller/filters.rb +++ b/actionpack/lib/action_controller/filters.rb @@ -761,7 +761,6 @@ module ActionController #:nodoc: def halt_filter_chain(filter, reason) @before_filter_chain_aborted = true logger.info "Filter chain halted as [#{filter.inspect}] #{reason}." if logger - false end end end diff --git a/actionpack/lib/action_controller/http_authentication.rb b/actionpack/lib/action_controller/http_authentication.rb index 170098dc58..18a503c3ad 100644 --- a/actionpack/lib/action_controller/http_authentication.rb +++ b/actionpack/lib/action_controller/http_authentication.rb @@ -93,9 +93,7 @@ module ActionController end def authenticate(controller, &login_procedure) - if authorization(controller.request).blank? - false - else + unless authorization(controller.request).blank? login_procedure.call(*user_name_and_password(controller.request)) end end @@ -122,7 +120,6 @@ module ActionController def authentication_request(controller, realm) controller.headers["WWW-Authenticate"] = %(Basic realm="#{realm.gsub(/"/, "")}") controller.send! :render, :text => "HTTP Basic: Access denied.\n", :status => :unauthorized - return false end end end diff --git a/actionpack/lib/action_controller/verification.rb b/actionpack/lib/action_controller/verification.rb index 28f12a0133..43927408a9 100644 --- a/actionpack/lib/action_controller/verification.rb +++ b/actionpack/lib/action_controller/verification.rb @@ -98,10 +98,7 @@ module ActionController #:nodoc: options[:redirect_to] = self.send!(options[:redirect_to]) if options[:redirect_to].is_a? Symbol redirect_to(options[:redirect_to]) if options[:redirect_to] end - return false end - - true end private :verify_action end diff --git a/actionpack/test/controller/flash_test.rb b/actionpack/test/controller/flash_test.rb index 35ab1b9d3c..4a6f3c9e0b 100644 --- a/actionpack/test/controller/flash_test.rb +++ b/actionpack/test/controller/flash_test.rb @@ -70,7 +70,6 @@ class FlashTest < Test::Unit::TestCase flash["foo"] = "bar" redirect_to :action => "std_action" @flash_copy = {}.update(flash) - false end end |