I have these models:
class Bill < ActiveRecord::Base
has_many :calls
has_many :text_messages
end
class Call < ActiveRecord::Base
belongs_to :bill
end
class TextMessage < ActiveRecord::Base
belongs_to :bill
end
Now, in my domain calls and text messages are both "the same kind of thing" -- i.e., they're both "bill items". So I'd like some_bill.bill_items
to return all calls and text messages associated with that bill. What's the best way to do this?