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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and 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.

: )

This topic is locked and can not be replied to.