How to give the First image in a gallery a different class than the rest of the images - Carrierwave
- by ChrisBedoya
I have a model called "Photo" that belongs to a model called "Shoe". I using Carrierwave to upload multiple images.
index.html.erb
<% shoes.each do |shoe| %>
<div class="shoe">
<div class="gallery">
<% shoe.photos.each do |photo| %>
<%= link_to image_tag(photo.photo_file.url(:thumb).to_s),…