Forum: Ruby on Rails Re: Is eval the only way?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jason T. (Guest)
on 2006-04-06 03:05
(Received via mailing list)
>>
>>
>
> Inside Rails, you can do:
> x = class_name.constantize.find(:all, :conditions => "#{conditions}")
>
> constantize is a more-readable shortcut for the const_get business.

Thanks Wilson! -- That works like a charm.

: )

Jason
This topic is locked and can not be replied to.