Skip to content

Commit

Permalink
Use stable sort when prioritizing app assets (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 authored Sep 30, 2024
1 parent 916d158 commit 8112610
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/propshaft/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Railtie < ::Rails::Railtie

config.after_initialize do |app|
# Prioritize assets from within the application over assets of the same path from engines/gems.
config.assets.paths.sort_by! { |path| path.to_s.start_with?(Rails.root.to_s) ? 0 : 1 }
config.assets.paths.sort_by!.with_index { |path, i| [path.to_s.start_with?(Rails.root.to_s) ? 0 : 1, i] }

config.assets.relative_url_root ||= app.config.relative_url_root
config.assets.output_path ||=
Expand Down

0 comments on commit 8112610

Please sign in to comment.