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
123
November 10, 2006
Define a string as a Model object
rubyonrails-talk
5
307
February 5, 2010
variable variable
rubyonrails-talk
0
120
February 28, 2007
dymanic changes for model name
rubyonrails-talk
0
110
October 11, 2007
variable variable
rubyonrails-talk
0
104
March 1, 2007