>  Person.create([{:name => 'Adam'}, {:name => 'Jeremy'}]) do |p|
>
>   p.set_status(:cool)
>  end

['Adam', 'Jeremy'].each do |name|
  Person.create do |p|
    p.name = name
    p.set_status(:cool)
  end
end

is not that different, and just uses a common ruby idiom

Cheers,
Ian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to