I have this helper that I am building:
def myhelper(object, attributes = [])
attributes.each do |attr|
object.attr
end
end
I invoke this helper using:
myhelper Person, [:title, :name]
What I am trying to achieve is to print a list of attributes in Person dynamically but object.attr in myhelper method won't work.
How can I do that?