aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb8
-rw-r--r--actionpack/test/abstract_unit.rb6
2 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb
index 7a2bf8bef6..062aa4dae5 100644
--- a/actionpack/lib/sprockets/helpers/rails_helper.rb
+++ b/actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -58,8 +58,12 @@ module Sprockets
private
def debug_assets?
- config = Rails.application.config.assets
- config.allow_debugging && (config.debug || params[:debug_assets])
+ begin
+ config = Rails.application.config.assets
+ config.allow_debugging && (config.debug || params[:debug_assets])
+ rescue NoMethodError
+ false
+ end
end
# Override to specify an alternative prefix for asset path generation.
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index aa7a01f6c9..24d071df39 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -142,11 +142,7 @@ class RoutedRackApp
end
class BasicController
- attr_accessor :request, :params
-
- def initialize
- @params = {}
- end
+ attr_accessor :request
def config
@config ||= ActiveSupport::InheritableOptions.new(ActionController::Base.config).tap do |config|