Michael Koziarski wrote:
> On 10/2/06, MacProBob <bobtheslob gmail.com> wrote:
> >
> > I've been playing around with nested models and
ran across the method
> > named class_name in Base. While looking at how to
modify this to
> > support nested models, I figured out that it
doesn't appear to be used
> > at all in the code base.
> >
> > Does this method still have a purpose? In what
situation would you want
> > to determine a class_name from a table name?
> >
> > I looked through trac but it existed in the oldest
version in trac so i
> > couldn't track down it use.
>
> When you remove it, all the tests (except the obvious
one) still pass,
> so I'm stumped. It's :nodoc:'d so it's never been an
advertised
> feature. Unless someone else chimes in, I can't see
why we wouldn't
> just remove it...
The Magic Models uses it (http://magicmodels.r
ubyforge.org). It ensures
that all the conventions of table prefixes, pluralisation
etc are
supported when dynamically creating ActiveRecords based on
existing
tables.
If you do remove it, then I will add it back into the MM's
explicitly.
Nic
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-core googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---
|