Calling a setter method using a symbol
2 answers
I am assuming you are trying to dynamically set the value of various attributes on an object.
try this:
object.send("#{attr}=", value)
There was a similar question yesterday that might help as this is a more specific example.
+6
source to share