lib/mno_enterprise/api/engine.rb in mno-enterprise-api-2.0.9 vs lib/mno_enterprise/api/engine.rb in mno-enterprise-api-3.0.0
- old
+ new
@@ -2,8 +2,18 @@
module Api
class Engine < ::Rails::Engine
isolate_namespace MnoEnterprise
# To be able to load lib/mno_enterprise/concerns/...
config.autoload_paths += Dir["#{config.root}/lib/**/"]
+
+ # Add assets
+ if config.respond_to? (:assets)
+ config.assets.precompile += %w( mno_enterprise/config.js )
+
+ # Allow sprockets to find file in the config/ path
+ config.before_configuration do
+ config.assets.paths.unshift Rails.root.join('config').to_s
+ end
+ end
end
end
end