On Thu, 24 Mar 2005 17:29:50 -0800, D Andrew Reynhout
<reynhout-Yp+tNMrX9ANBDgjK7y7TUQ@public.gmane.org>
wrote:> It sounds like you need Class Table Inheritance. There''s a patch
> (RESEARCH) by johnwilger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org to
implement CLSTI, which I am
> using for a similar need.
>
> http://dev.rubyonrails.com/ticket/600
>
> Andrew
Well, no. See, the inherited classes need to be using the *exact
same* table. The extra methods are using the same table field,
they''re just doing some extra processing on top of what already
exists.
This works I think:
class FlickrFeed < Feed
has_many :feed_items, :class_name => "FlickrFeedItem",
:foreign_key
=> "feed_id"
end
It looks like it overwrites the feed_items from the parent with the
version I wanted. Is there anything really wrong with this approach?
--
Bob Aman