Unlike the correct placement of the area.
Perhaps you are trying to do this:
class PostTag < ... belong_to :post belongs_to :tag def distincttag find(:all, :select => 'distinct tag_id') end end
Edit: now that I know what you need:
User has_many :posts has_many :post_tags, :through => :posts, :select => 'distinct tags.*'
Link: http://blog.hasmanythrough.com/2006/5/6/through-gets-uniq
source share