Means I can get the hashes as
Result = Hash.new
Result = employees.collect {|employee| employee.attributes}
then the result contails the array of hashes?
On Nov 26, 12:23 pm, Pradeep Gatram <[EMAIL PROTECTED]> wrote:
> Think in terms of the domain. What you need is an array of hashes.
> Each hash is a representation of your domain object (employee record)
>
> employees.collect {|employee| employee.attributes}
>
> Thats it.
>
> If there are any particular attributes that you don't want, e.g.
> created_at, then use something like
>
> employees.collect {|employee| employee.attributes.except(:created_at)}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---