Its worth noting that Kevin's method is Ruby, where constantize is Rails
sugar.
Cheers,
Rob
On Thu, Apr 17, 2008 at 6:51 PM, Glenn Little <[EMAIL PROTECTED]> wrote:
>
> Nathan Clark wrote:
> > s.constantize.find(:first)
>
> and
>
> Kevin Clark wrote:
> > Odysseus:~ kev$ irb
> >>> class Foo
> >>> end
> > => nil
> >>> Object.const_get("Foo")
> > => Foo
> >
> > ri const_get
> >
>
> Both of these work. "classes are constants" is
> the key. Thanks!
>
> -glenn
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---