I was wondering whether there is a nice Rubyesque way of selecting
from a pair of HABTM models where one of them is inherited from
Here is the situation:
I have a ‘posts’ table from which ‘replies’ and ‘articles’ are
inherited. Articles have_and_belong_to_many categories, but neither
posts nor replies do (it just does not seem to be very useful). I want
to have a page which shows (paginatedly) the articles in a selected
category. So given a category, I would like to return an array of all
of the articles associated with it.
I am no master of SQL syntax, so I am not sure what to include in a
'LEFT JOIN" statement.
Thanks for any help,