<% if image.is_flash? %> <%= attachment_for_flash(image.photo.url) %> <% else %> <%= image_tag((image.source.nil? ? image.photo.thumb(image.imageable.class.style_publisher).url : image.source_to_image), :alt => "") %> <% end %>

<%= link_to "remover", "javascript://", :class => "remove_image"%>
<%= link_to "ver original", image.source || image.photo.url, :target => "blank"%>

<%= text_field_tag "#{image.imageable.class.name.downcase}[images_attributes][#{image.id}][caption]", image.caption%> <%= hidden_field_tag "#{image.imageable.class.name.downcase}[images_attributes][#{image.id}][id]", image.id%>