You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I'm aware of #237 and I think I understand the reasoning. I wanted to explain our use case and see if it makes sense.
We have a situation where we want to embed a platform.css inside a platform.js. For this, in Rails 4 we used <%= Rails.application.assets['platform.css'].to_s %>. We can't switch to Rails.application.assets_manifest.find_sources because the platform.css isn't there the very first time you run assets:precompile.
We solved this issue by initializing a sprockets environment, using:
Even though assets.compile is false, I would have expected that Rails.application.assets is available during the assest:precompile rake task. It is the production environment, but it's also the precompilation task.
I wonder if you'd reconsider this use case and if we can find an alternative. Thanks.
The text was updated successfully, but these errors were encountered:
First of all, I'm aware of #237 and I think I understand the reasoning. I wanted to explain our use case and see if it makes sense.
We have a situation where we want to embed a
platform.css
inside aplatform.js
. For this, in Rails 4 we used<%= Rails.application.assets['platform.css'].to_s %>
. We can't switch toRails.application.assets_manifest.find_sources
because theplatform.css
isn't there the very first time you runassets:precompile
.We solved this issue by initializing a sprockets environment, using:
Even though
assets.compile
is false, I would have expected thatRails.application.assets
is available during theassest:precompile
rake task. It is the production environment, but it's also the precompilation task.I wonder if you'd reconsider this use case and if we can find an alternative. Thanks.
The text was updated successfully, but these errors were encountered: