image fille

This commit is contained in:
Nicolas Bally 2011-08-22 13:20:43 +02:00
parent 160c1704bb
commit d84361f265

View File

@ -43,7 +43,7 @@ module Formtastic
def image_preview(method, options,r) 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 ") template.content_tag(:span, template.image_tag(object.image_file.file.large.medium.small.thumb.url, :id => "img_"+r.to_s), :class => "preview ")
else else
template.content_tag(:span, template.image_tag("", :id => "img_"+r.to_s), :class => "preview ") template.content_tag(:span, template.image_tag("", :id => "img_"+r.to_s), :class => "preview ")