Skip to content

Commit 3bd4470

Browse files
committed
Ensure $root/app/assets
Closes #154
1 parent b54af68 commit 3bd4470

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/sprockets/railtie.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def assets
4141
module Sprockets
4242
class Railtie < ::Rails::Railtie
4343
LOOSE_APP_ASSETS = lambda do |filename, path|
44-
path =~ /app\/assets/ && !%w(.js .css).include?(File.extname(filename))
44+
path.start_with?(::Rails.root.join("app/assets").to_s) &&
45+
!%w(.js .css).include?(File.extname(logical_path))
4546
end
4647

4748
class OrderedOptions < ActiveSupport::OrderedOptions

0 commit comments

Comments
 (0)