I would like to write some custom helpers like the ones available as
form helpers text_field, text_area and the like. My first try was this:
‘some_string’ + obj.send(meth) + ‘some_other_string’
Object and method are being passed as symbols like this:
and Ruby rightfully complains that the symbol person does not have a
method named name. Second try was this. @person is an instance
variable of the controller, right?
‘some_string’ + self.get_instance_variable(obj).send(meth) +
and I get “`person’ is not allowed as an instance variable name”.
How does Rails do that? I can see the text_field being Implemented
InstanceTag.new(object, method, self)
but I have no idea what the InstanceTag class does or where I can
Many thanks in advance for any pointers!