Try:
user.attributes
Should be exactly what you're looking for. There are also #dirty_attributes
and #original_attributes methods.
On 20/09/2011, at 1:46 AM, Teddy Limousin wrote:
> Hey guys,
>
> I have an object User with 5 properties, how to I get a hash like
> {property_name => value}
>
> Regards
>
> --
> Teddy Limousin
>
> --
> You received this message because you are subscribed to the Google Groups
> "DataMapper" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/datamapper?hl=en.
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.