I must be missing something. I have a list of values returned (id's to
my 'associates'  table) and I want to update all of those in the list.
Presently, I iterate through the list, updating each one (see below).

Isn;t there a way I can do this all in one fell swoopy in RoR, without
having to iterate through the list? -Janna B.

params[:form__list1].each do |id|
          associate = Associate.find(id)
          associate.update_attributes({:channel_id =>
@channel.id, :joined_channel_datetime => DateTime.now})
end
--~--~---------~--~----~------------~-------~--~----~
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