problème lors de la suppression d'une image réglé
This commit is contained in:
parent
d84361f265
commit
d53e3a9f00
@ -42,8 +42,8 @@ module Formtastic
|
||||
end
|
||||
|
||||
def image_preview(method, options,r)
|
||||
|
||||
if object.send("#{method}?") and object.image_file.file
|
||||
puts "#{method}"
|
||||
if object.send("#{method}?") and ImageFile.exists?(object.send("#{method}"))
|
||||
template.content_tag(:span, template.image_tag(object.image_file.file.large.medium.small.thumb.url, :id => "img_"+r.to_s), :class => "preview ")
|
||||
else
|
||||
template.content_tag(:span, template.image_tag("", :id => "img_"+r.to_s), :class => "preview ")
|
||||
|
Loading…
x
Reference in New Issue
Block a user