There was an error while loading. Please reload this page.
1 parent 9c7cbf9 commit 8931db9Copy full SHA for 8931db9
lib/formtastic/inputs/dragonfly_input.rb
@@ -84,10 +84,12 @@ def fragment_url_html
84
end
85
86
def fragment_remove_html
87
- template.content_tag(:label, for: fragment_id(:remove)) do
88
- builder.check_box("remove_#{method}") <<
89
- " ".html_safe <<
90
- I18n.t("dragonfly.remove")
+ if object.send("#{method}_uid")
+ template.content_tag(:label, for: fragment_id(:remove)) do
+ builder.check_box("remove_#{method}") <<
+ " ".html_safe <<
91
+ I18n.t("dragonfly.remove")
92
+ end
93
94
95
0 commit comments