Before Propshaft you would use Rails.application.assets.find_asset(path).present?
.
But how do you check if an asset exists using the new asset library for Rails 8?
Before Propshaft you would use Rails.application.assets.find_asset(path).present?
.
But how do you check if an asset exists using the new asset library for Rails 8?
Share Improve this question edited Mar 16 at 18:07 Timothy Alexis Vass asked Mar 15 at 18:07 Timothy Alexis VassTimothy Alexis Vass 2,7252 gold badges13 silver badges32 bronze badges1 Answer
Reset to default 1With Propshaft, this is handled by the resolver.
Rails.application.assets.resolver.resolve(logical_path).present?