-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not finding my asset #17
Comments
It doesn't seem to work either, if I changed the file to Possible that I'm doing something else wrong... |
Actually I had this line of code repeated, and I was changing the wrong one. I still get Rails version 4.2.7.1 FYI |
I needed this (to poke around a bit, and read README more thoroughly, it was in there) JsAssets::List.allow << '*.png' Now I made some progress,
but I still have something blocking it from populating In other words, it's workable for me at this time, but I still think something is wrong. I think it should also work with I think for sure my asset pipeline is implemented correctly and this has to be a quirk in js_assets. Maybe it is something weird about precompiled assets that I just don't understand. |
I'm at a loss. window.project_assets = <%= JsAssets::List.fetch.to_json %>;
window.asset_path = function(logical_path) {
return window.project_assets[logical_path];
}; and
but
|
Remember to delete Works now. Thanks! Great gem. I will leave this open but you can close it. |
I am using a custom RAILS_ENV=staging for my QA environment, but I think this issue still exists if I set RAILS_ENV=production. I looked through your code for specific references to environment names and found that they had been removed, so I'm guessing this should work. (Maybe it's something addressed by the open pull request. Not sure.)
I have a little red "X" png that is part of my image assets, and it needs to be included in some javascript code that adds nested attributes as part of a workflow for file attachments. The file
x_16x16.png
is in the asset pipeline.However, I include this snippet:
and it comes out like:
Can you help? I have found no other way to include asset paths in javascript cleanly.
The text was updated successfully, but these errors were encountered: