Browse files

Merge pull request #2647 from dmathieu/no_rescue

remove useless rescue
  • Loading branch information...
1 parent e3ba2cf commit 72802c62524eee2acb0db2ffa578b0648447f929 @spastorino spastorino committed Aug 24, 2011
Showing with 8 additions and 7 deletions.
  1. +3 −6 actionpack/lib/sprockets/helpers/rails_helper.rb
  2. +5 −1 actionpack/test/abstract_unit.rb
View
9 actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -70,12 +70,9 @@ def asset_path(source, default_ext = nil, body = false, protocol = nil)
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.
View
6 actionpack/test/abstract_unit.rb
@@ -142,7 +142,11 @@ def call(env)
end
class BasicController
- attr_accessor :request
+ attr_accessor :request, :params
+
+ def initialize
+ @params = {}
+ end
def config
@config ||= ActiveSupport::InheritableOptions.new(ActionController::Base.config).tap do |config|

0 comments on commit 72802c6

Please sign in to comment.