I was wondering if you could help me with a quick question on writting polymorphic join associations.
I have User has_many Favorite(polymorphic). The user has favorite Posts and Favorite Comments.
I want set up a direct association on User to Post
class User < ActiveRecord::Base has_many :favorite_posts , :as => :favoriteable, :source => :posts end
I'm not quite sure how to describe that :favorite_posts association. Right now, I'm just using a little method to bridge the gap, but would prefer something more conventional, if possible.
Any help would be appreciated!
Thanks,
-MgR