lib/requirejs/rails/engine.rb in requirejs-rails-0.9.5 vs lib/requirejs/rails/engine.rb in requirejs-rails-0.9.6
- old
+ new
@@ -1,8 +1,8 @@
-require 'requirejs/rails/config'
+require "pathname"
-require 'pathname'
+require "requirejs/rails/config"
module Requirejs
module Rails
class Engine < ::Rails::Engine
### Configuration setup
@@ -52,10 +52,10 @@
if ::Rails::VERSION::MAJOR >= 4
config.after_initialize do |app|
config = app.config
rails_manifest_path = File.join(app.root, 'public', config.assets.prefix)
- rails_manifest = Sprockets::Manifest.new(app.assets, rails_manifest_path)
+ rails_manifest = ::Sprockets::Manifest.new(app.assets, rails_manifest_path)
if config.requirejs.manifest_path.exist? && rails_manifest
rjs_digests = YAML.load(ERB.new(File.new(config.requirejs.manifest_path).read).result)
rails_manifest.assets.merge!(rjs_digests)
ActionView::Base.instance_eval do
self.assets_manifest = rails_manifest