Skip to content

Commit

Permalink
Merge pull request #2647 from dmathieu/no_rescue
Browse files Browse the repository at this point in the history
remove useless rescue
  • Loading branch information
spastorino committed Aug 24, 2011
1 parent e3ba2cf commit 72802c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 3 additions & 6 deletions actionpack/lib/sprockets/helpers/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion actionpack/test/abstract_unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit 72802c6

Please sign in to comment.