Displaying 1 result from an estimated 1 matches for "find_by_attachable_id".
2010 Feb 17
1
Paperclip and viewing images
...url => "/assets/:id/",
:path =>
":rails_root/public/assets/:id/:style.:extension"
belongs_to :attachable, :polymorphic => true
I have the multiple images upload working but when i try to view them in
show.erb.html code below
<% @photo = Asset.find_by_attachable_id(@task.id)%>
<%if !@photo.blank? %>
<%= image_tag (@photo.photo.url(:small) )%>
i''m getting html out put of <img src="/assets/4/?1266410329"
alt"?1266410329">
it should be <img src="/assets/4/small.jpg" alt"small.jpg"&g...