All of these should work:
user[attribute_name]
user.read_attribute(attribute_name)
user.send(attribute_name)
Personally I wouldn’t use send in this case. When available, prefer public_send to send
All of these should work:
user[attribute_name]
user.read_attribute(attribute_name)
user.send(attribute_name)
Personally I wouldn’t use send in this case. When available, prefer public_send to send