1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #2647 from dmathieu/no_rescue

remove useless rescue
This commit is contained in:
Santiago Pastorino 2011-08-24 07:02:03 -07:00
commit f162f84aa5
2 changed files with 8 additions and 7 deletions

View file

@ -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.

View file

@ -142,7 +142,11 @@ class RoutedRackApp
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|