From e5f2b0d75f29cd7d9e11e8008d410caf48ab1078 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 30 Aug 2011 20:47:01 -0300 Subject: Revert "Merge pull request #2647 from dmathieu/no_rescue" This reverts commit 125b1b0b9180ec8f0135da185e77250d2b8a4bea. --- actionpack/lib/sprockets/helpers/rails_helper.rb | 8 ++++++-- actionpack/test/abstract_unit.rb | 6 +----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'actionpack') 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| -- cgit v1.2.3