Permalink
Browse files

Asset pipeline detection fix for Rails 3.0

  • Loading branch information...
1 parent 68d01e8 commit 44e9680414e3c411a8c1e9757e773d9d492d118d @bcardarella bcardarella committed Oct 28, 2011
View
2 lib/generators/client_side_validations/copy_asset_generator.rb
@@ -6,7 +6,7 @@ class CopyAssetGenerator < Rails::Generators::Base
private
def self.asset_pipeline_enabled?
- (Rails.configuration.assets || {})[:enabled]
+ (Rails.configuration.respond_to?(:assets) ? (Rails.configuration.assets || {}) : {})[:enabled]
end
def asset_pipeline_enabled?
View
2 lib/generators/client_side_validations/install_generator.rb
@@ -6,7 +6,7 @@ class InstallGenerator < Rails::Generators::Base
private
def self.asset_pipeline_enabled?
- (Rails.configuration.assets || {})[:enabled]
+ (Rails.configuration.respond_to?(:assets) ? (Rails.configuration.assets || {}) : {})[:enabled]
end
def asset_pipeline_enabled?

0 comments on commit 44e9680

Please sign in to comment.