By using the »attributes«, »attribute_names«, and »attribute_present?« methods.
The first returns a hash of attribute name/value pairs, the second an array of names, and the third returns true if a named attribute is available in this model object.
By using the »attributes«, »attribute_names«, and »attribute_present?« methods.
The first returns a hash of attribute name/value pairs, the second an array of names, and the third returns true if a named attribute is available in this model object.
Leave a Reply