Skip to content

Commit 21bd2aa

Browse files
committed
Copy paths in after initializer
1 parent df1fcd3 commit 21bd2aa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/sprockets/railtie.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ def assets
2424
path = "#{config.root}/tmp/cache/assets/#{::Rails.env}"
2525
env.cache = Sprockets::Cache::FileStore.new(path)
2626

27-
config.assets.paths.each do |path|
28-
env.append_path(path)
29-
end
30-
3127
env.context_class.class_eval do
3228
include ::Sprockets::Rails::Helper
3329
end
@@ -75,6 +71,11 @@ def configure(&block)
7571

7672
manifest_path = File.join(app.root, 'public', config.assets.prefix)
7773

74+
# Copy config.assets.paths to Sprockets
75+
config.assets.paths.each do |path|
76+
app.assets.append_path path
77+
end
78+
7879
ActiveSupport.on_load(:action_view) do
7980
include Sprockets::Rails::Helper
8081

0 commit comments

Comments
 (0)