aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorDamien Mathieu <42@dmathieu.com>2011-08-23 11:02:44 +0200
committerDamien Mathieu <42@dmathieu.com>2011-08-24 09:52:00 +0200
commit13dd7758cedf6152835c4c72b69b1fe631a60733 (patch)
tree139f4a047fa59403fa3b0c854f98ba26cffa43da /actionpack/lib
parent7079701e5bfe3b8d6e8339f2cc4964e3608f1ffe (diff)
downloadrails-13dd7758cedf6152835c4c72b69b1fe631a60733.tar.gz
rails-13dd7758cedf6152835c4c72b69b1fe631a60733.tar.bz2
rails-13dd7758cedf6152835c4c72b69b1fe631a60733.zip
remove useless rescue
params is a method, defined in every controller, which always returns a hash. If it raises a NoMethodError, it means there's a bug somewhere else, which we want to know about.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb
index 7200ab1ddd..4fb8d0af37 100644
--- a/actionpack/lib/sprockets/helpers/rails_helper.rb
+++ b/actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -70,12 +70,9 @@ module Sprockets
private
def debug_assets?
- begin
- params[:debug_assets] == '1' ||
- params[:debug_assets] == 'true'
- rescue NoMethodError
- false
- end || Rails.application.config.assets.debug
+ params[:debug_assets] == '1' ||
+ params[:debug_assets] == 'true' ||
+ Rails.application.config.assets.debug
end
# Override to specify an alternative prefix for asset path generation.