Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## image model
- named_scope :first_three, :limit => 3, :order => created_at ASC
- ## view
- <% @galleries.each do |gallery| %>
- <% gallery.images.first_three .each do |image| %>
- <%= link_to image_tag(url_for(:controller => 'images', :action => 'show_thumb', :id => image.id)), gallery %></td>
- <% end %>
- <% end %>
Add Comment
Please, Sign In to add comment