lib/formtastic/inputs/grid_input.rb in lalala-4.0.0.dev.131 vs lib/formtastic/inputs/grid_input.rb in lalala-4.0.0.dev.132
- old
+ new
@@ -15,11 +15,11 @@
assets.each_with_index do |asset, idx|
html += template.content_tag :li, class: "asset" do
builder.fields_for(method, asset) do |f|
lalala_thumb = f.object.asset.lalala_thumb
- if lalala_thumb
- link_inner_html = template.image_tag(lalala_thumb.url)
+ if url = lalala_thumb.try(:url)
+ link_inner_html = template.image_tag(url)
else
link_inner_html = ""
end
asset_html = template.raw("")