two suggestions: 1. set a debugger at the beginning of you show-method. that way you will find the reason for @photo being nil. 2. since Photo.id is your primary key (and therefore unique) you could just do your find like this: @photo = Photo.find(params[:id]) instead of the much longer: @photo = Photo.find_by_user_id_and_id(params[:user_id], params [:id], :include => :user) as long as id distinctly identifies the record the user_id doesn't matter.
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

