提交 e5f2b0d7 编写于 作者: S Santiago Pastorino

Revert "Merge pull request #2647 from dmathieu/no_rescue"

This reverts commit 125b1b0b.
上级 60d8e4ac
...@@ -58,8 +58,12 @@ def asset_path(source, default_ext = nil, body = false, protocol = nil) ...@@ -58,8 +58,12 @@ def asset_path(source, default_ext = nil, body = false, protocol = nil)
private private
def debug_assets? def debug_assets?
config = Rails.application.config.assets begin
config.allow_debugging && (config.debug || params[:debug_assets]) config = Rails.application.config.assets
config.allow_debugging && (config.debug || params[:debug_assets])
rescue NoMethodError
false
end
end end
# Override to specify an alternative prefix for asset path generation. # Override to specify an alternative prefix for asset path generation.
......
...@@ -142,11 +142,7 @@ def call(env) ...@@ -142,11 +142,7 @@ def call(env)
end end
class BasicController class BasicController
attr_accessor :request, :params attr_accessor :request
def initialize
@params = {}
end
def config def config
@config ||= ActiveSupport::InheritableOptions.new(ActionController::Base.config).tap do |config| @config ||= ActiveSupport::InheritableOptions.new(ActionController::Base.config).tap do |config|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册