We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I can't access the product's page if the product has no image. The problem is in _twitter.html.erb where it evals:
<meta property="twitter:image" content="<%= absolute_image_url(@product.images.first.attachment.url) %>" />
where @product.images.first is nil.
@product.images.first
I fixed it in my project hardcoding a
<% unless @product.images.first.nil? %> <meta property="twitter:image" content="<%= absolute_image_url(@product.images.first.attachment.url) %>" /> <% end %>
The text was updated successfully, but these errors were encountered:
I created a fork that resolves this. https://github.com/anthonyto/spree_social_products
Sorry, something went wrong.
No branches or pull requests
I can't access the product's page if the product has no image. The problem is in _twitter.html.erb where it evals:
<meta property="twitter:image" content="<%= absolute_image_url(@product.images.first.attachment.url) %>" />
where
@product.images.first
is nil.I fixed it in my project hardcoding a
<% unless @product.images.first.nil? %> <meta property="twitter:image" content="<%= absolute_image_url(@product.images.first.attachment.url) %>" /> <% end %>
The text was updated successfully, but these errors were encountered: