[Rails Tip] "String".constantize

1 · Fred Wu · Feb. 26, 2010, 6:33 a.m.
So we want to dynamically instantiate an object (i.e. convert a string to a class constant). Instead of doing this: You can do this: See…...