class ProfileController < ApplicationController
def show
@user = current_user
@first_name = @user.first_name
@last_name = @user.last_name
end
def settings
end
def pics
@photos = current_user.photos.all
end
end
in the view of _pics.html.erb, I have
<% @photos.each do |p| %>
<%= image_tag p.image(:medium) %>
<% end %>
If I change it to current_user.photos.each do |p|, it works, which is weird. I don't get an error from this code on my other computer.