Ruby on Rails Discussions
Find when you have the model name but not the class
rubyonrails-talk
Chris_Hall
(Chris Hall)
November 10, 2006, 5:22pm
1
2 ways I know of...
Object.const_get("MyClass")
eval("MyClass")
not sure which is more efficient
Related topics
Topic
Replies
Views
Activity
Find when you have the model name but not the class
rubyonrails-talk
0
126
November 10, 2006
Define a string as a Model object
rubyonrails-talk
5
309
February 5, 2010
variable variable
rubyonrails-talk
0
124
February 28, 2007
dymanic changes for model name
rubyonrails-talk
0
113
October 11, 2007
variable variable
rubyonrails-talk
0
105
March 1, 2007