-
Notifications
You must be signed in to change notification settings - Fork 92
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
Active storage attachments cant render #628
Comments
@reeganviljoen Thanks for the detailed bug report and many apologies for taking so long to get back to you on this. I've just tried to reproduce the issue in one of my apps that is using ActiveStorage and I've so far not been able to replicate the issue - but I suspect that is because of a different controller/preview class setup somehow. I've got a few questions that would help me figure out what is going on here, if you are still interested in this issue despite me taking so long to reply!
One thing you could also try (although I'm not sure it would make any difference in this situation) is to try calling the host application's helpers.main_app.url_for(@user.avatar) I realise that is not ideal but it would be interesting to know if that results in the correct URL being rendered or not. Thank you! |
Describe the bug
Using active storage attachments inside a component rendered inside lookbook fails due to lookbook being its own isolated engine so a component(or partial) with
url_for(user.avatar)
will not be able to render the attachment used in lookbook but not normallyTo Reproduce
Steps to reproduce the behavior:
then when i open the image up(i.e
http://localhost:3000/lookbook/rails/active_storage/blobs/redirect/<secure_id>/my_image.jpeg
)Expected behavior
Lookbook should be able to render the attachment in the component like the default rails engine is able too
Version numbers
Please complete the following information:
The text was updated successfully, but these errors were encountered: