User has many articles (and Article belongs to user)
User has and belongs to many articles (and Article habtm users)
But this is tricky because of: current_user.articles …this can return
articles thanks to has_many and has_and_belongs_to relations. So
there’s a collision.
How can I ask articles thanks has_and_belongs_to explicitly. And thanks
has_many only too?
But this is tricky because of: current_user.articles …this can return
articles thanks to has_many and has_and_belongs_to relations. So
there’s a collision.
How can I ask articles thanks has_and_belongs_to explicitly. And thanks
has_many only too?
Call one of the relationships something else, eg
has_many :something_articles, :class_name => “Article”