I am creating a layout of images with links.
In Photo model:
has_attached_file :mainimg, :styles => {:original =>
“465x365”, :thumb => “80x70”}
In my Front controller:
def index
@photos = Photo.find(:all)
@photos = Photo.paginate :per_page => 28, :page => params[:page]
end
In index.dryml:
<% outer = ‘a’ %>
<% inner = 1 %>
<% @photos.in_groups_of(7).each do |photorow| %>
<% photorow.each do |photo| %>
<% link_to_remote (image_tag(photo.mainimg.url(:thumb)),
:url => {:action => ‘projects/show’, :id => ‘#
{photo.project_id}’}) if photo.mainimg? %>
Evidently image_tag(photo.mainimg.url(:thumb) is not right, but being
a novice not sure where I am
going wrong.
Thanks,
Jet