On Sat, Jan 16, 2010 at 12:56 PM, Mislav Marohnić <[email protected]> wrote:
> On Sat, Jan 16, 2010 at 12:37, Xavier Noria <[email protected]> wrote: >> >> The guide could warn about AR::Base. We could also redefine >> AR::Base.subclasses to match the rest (I'd volunteer). ack says there >> are not a lot of occurrences, but it wouldn't be backwards compatible. > > I can imagine that plugins might use Base.subclasses to iterate over AR > models. > thinking-sphinx does this, for instance. > > The question is, why would we standardize on strings? Why not actual > references, like `ancestors`? I first thought about changing AR because at least that is a protected method and it could be the case that it breaks less code. But all being equal, I'd expect subclasses to return class objects indeed, for example Object#subclasses_of does, and anyway that is what the name would suggest to me.
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
