Skip to content
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

Fix #index preview crash on when no image attached #23

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

jrupinski
Copy link
Contributor

When obejcts have no activerecord blob attached to the field, #index didn't account for that, resulting in method call on nil.
The #show method already has a #present? check, so it was added it to #index as well, fixing this issue.

image

@nickcharlton
Copy link
Member

Thanks!

@nickcharlton nickcharlton merged commit 92be813 into thoughtbot:main Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants