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
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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs