I have an aplication that has an User and a Project model. I have the following relationships between those 2 models:
USER
has_many :authorships , :foreign_key => :author_id
has_many :moderatorships, :foreign_key => :moderator_id
has_many :authored_projects, :through => :authorships, :class_name => 'Project'
has_many :moderated_projects, :through => :moderatorships, :class_name => 'Project'
I want to have a route that is /users/id/favorite_projects and /users/id/moderated_projects. I have the following in my routes.rb
map.resources :users,:has_many => [:authored_projects, :moderatored_projects], :shallow => true, :collection => {:logins => :get}
But when I run rake routes I get
user_authored_projects GET /users/:user_id/authored_projects(.:format) {:controller=>"authored_projects", :action=>"index"}
But, I don't really have an authored_projects controller. How can I achieve that?