Say I have the model name saved in a variable:
"#{class_name.singularize}"
from another controller I want to see the columns defined for this model. I tried
send("#{class_name.singularize}.columns")
but its trying to call Page.columns as a method of the class I am currently working in rather than the Page class. Any ideas on how to do this?
Use
constantize: