Skip to content

Commit

Permalink
scope the Rails reference so Guard::Rails is not used instead of actu…
Browse files Browse the repository at this point in the history
…al Rails
  • Loading branch information
johnbintz committed Nov 18, 2011
1 parent ef0d920 commit e329b10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/guard/rails-assets/rails_runner.rb
Expand Up @@ -40,12 +40,12 @@ def clean
Rake::Task["tmp:cache:clear"].execute
# copy from the "assets:clean" Rake task
config = ::Rails.application.config
public_asset_path = File.join(Rails.public_path, config.assets.prefix)
public_asset_path = File.join(::Rails.public_path, config.assets.prefix)
rm_rf public_asset_path, :secure => true
end

def precompile
config = Rails.application.config
config = ::Rails.application.config
unless config.assets.enabled
warn "Cannot precompile assets if sprockets is disabled. Enabling it."
config.assets.enabled = true
Expand All @@ -61,8 +61,8 @@ def precompile
config.assets.digest = digest
config.assets.digests = {}

env = Rails.application.assets
target = File.join(Rails.public_path, config.assets.prefix)
env = ::Rails.application.assets
target = File.join(::Rails.public_path, config.assets.prefix)
compiler = Sprockets::StaticCompiler.new(env,
target,
config.assets.precompile,
Expand Down

0 comments on commit e329b10

Please sign in to comment.