As the topic suggests, I have a USER model that has many Projects, and a
PROJECT model that has many Activities. What is the easiest way to find
all Activities that belong to the logged in user? Is this something
that isn't possible and should I also create a user_id in activities and
create a BT/HM relationship there?
Read about has many through...
If you end up with lots of users/projects though it won't be really really
fast. If you want it lightning fast add user_id to activities so you can
query it directly.
class Assignment < ActiveRecord::Base
belongs_to :programmer # foreign key - programmer_id
belongs_to :project # foreign key - project_id
class Programmer < ActiveRecord::Base
has_many :projects, :through => :assignments
class Project < ActiveRecord::Base
has_many :programmers, :through => :assignments