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
-~----------~----~----~----~------~----~------~--~---

Reply via email to