Hello, I'm using Rails 3 with devise.
I have a table books which has a column for user_id, which is related to the Users table (user.rb)
I'm trying to create a Scope that shows all the books with the user's email address (Books joined to Users)
class Note < ActiveRecord::Base
scope :personal, proc {|user| where(:user_id => user.id) }
end
Can you help me understand why this is erroring with: "Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id"
thanks