lib/eastwood/engine.rb in eastwood-0.1.2 vs lib/eastwood/engine.rb in eastwood-0.3.1
- old
+ new
@@ -1,10 +1,13 @@
module Eastwood
class Engine < Rails::Engine
-
+
initializer 'eastwood.setup' do |app|
+ # include helpers in the sprockets context
app.assets.context_class.instance_eval do
- include Eastwood::Helpers
+ include Eastwood::Context
end
+ # watch for changes in eastwood initializer
+ app.config.watchable_files << 'config/initializers/eastwood.rb'
end
end
end