-
Notifications
You must be signed in to change notification settings - Fork 72
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
Can't find assets in production if '.svg' is forgotten #41
Comments
We could update the naive asset finder to append |
Didn't know that, very interesting! I think it's indeed a good idea to mirror the image_tag helpers. Maybe we could try clarifying the error message: if filename.ends_with? '.svg'
"<svg><!-- SVG file not found: '#{filename}' --></svg>"
else
"<svg><!-- SVG file not found: '#{filename}' (Try adding '.svg' to your filename) --></svg>"
end |
Good idea. We could add that hint if we're using the naive asset finder and not Sprockets. |
Fixed in v0.9.1. |
I discovered this issue in production environment. Why not simply put |
@madeindjs the reason I chose to add the empty |
So
inline_svg 'logo'
works in development, but not in production.inline_svg 'logo.svg'
works in both. I thinkInlineSvg::AssetFile
should append.svg
if it is not present, or raise an Error.It is very confusing if this problem occurs.
The text was updated successfully, but these errors were encountered: