has_many through a habtm relationship in Rails
- by macek
I'm trying to define a has_many X, :through => Y where Y is a habtm relationship. Rails is throwing a fit about this. See comment in user model:
class User < ActiveRecord::Base
has_many :posts
# I want to display a list of all tags this user is involved in
has_many :tags, :through => :posts # ERROR
end
class Post <…