image fille
This commit is contained in:
parent
160c1704bb
commit
d84361f265
@ -43,7 +43,7 @@ module Formtastic
|
||||
|
||||
def image_preview(method, options,r)
|
||||
|
||||
if object.send("#{method}?")
|
||||
if object.send("#{method}?") and object.image_file.file
|
||||
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