Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <% if current user %>
- <% @user_favorites = current_user.fav_photos %>
- <% @photos.each do |photo| %>
- <li>
- <%= link_to photo.name, photo_path(photo) %>
- <% if @user_favorites.include?(photo) %>
- <%= 'is favorite' %>
- <% end %>
- </li>
- <% end %>
- <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement