Permalink
Browse files

Add gauges.js to config.assets.precompile.

  • Loading branch information...
1 parent 2e55b40 commit 3a554ce846d65c3929b6d28d9ae6b002d70c0f9c @tylerhunt committed Mar 29, 2012
Showing with 8 additions and 0 deletions.
  1. +4 −0 lib/gauges/rails/engine.rb
  2. +4 −0 spec/gauges-rails_spec.rb
@@ -5,6 +5,10 @@ module Rails
class Engine < ::Rails::Engine
config.gauges = ActiveSupport::OrderedOptions.new
config.gauges.site_id = nil
+
+ initializer 'gauges-rails.update_precompiled_assets' do |app|
+ app.config.assets.precompile << 'gauges.js'
+ end
end
end
end
@@ -31,5 +31,9 @@
get '/assets/gauges.js'
last_response.body.should include(site_id)
end
+
+ it 'updates the list of precompiled assets' do
+ app.config.assets.precompile.should include('gauges.js')
+ end
end
end

0 comments on commit 3a554ce

Please sign in to comment.