my situation is describes as:
User has_many Blog
Blog has_many BlogPost
BlogPost belongs_to Blog
Blog belongs_to User
now, to "bridge" User with Post I wrote in User model:
has_many :blog_posts, :through => :blogs, :source => :posts
and so far it works.
to bridge BlogPost with User (author) I wrote in BlogPost model:
delegate :user, :to => :blog
the problem is, since there's no belongs_to :through, I need to find a
better AR compliant way to bridge BlogPost with User, since I have to
use a counter_cache field on User model that contains the number of
BlogPost he made.
of course I can write my callbacks to handle this situation, but I
feel like reinventing the wheel.
somebody got some tips to share?