Topic: Find object via outside model in controller
I have a has_many data structure: Users have many Contacts
In my contacts_controller, I want to list just the addresses for a given user.
@contact_pages, @contacts = paginate User.find(session[:id]).contacts, :per_page => 10
Is there another way to do this? I know I could put this logic in my users_controller, but I wanted to separate the logic for contacts into a separate controller.