Hi All,
I am a Ruby Developer… I am looking for a new ROR (sub)
contract/freelance role.
In my last contract i actively contributed to the web project and using
Rails, Postgresql, CoffeeScript, jQuery, TDD/BDD based testing with Ruby
(RSpec, Cucumber, Capybara) libraries to develop web applications.
I am available for an immediate start.
Thanks
Ikenna
---------- Forwarded message ----------
From: Phil C. [email protected]
Date: Thu, May 24, 2012 at 11:40 PM
Subject: Re: [Rails] Help with inserting multiple records via console
To: [email protected]
Not exactly, you could create an array of params hashes and iterate over
it. Using your example, it would be something like:
[{:title => “Test title 1”, :body => “Test body text 1, …”,
:published_at
=> Date.today}, {:title => “Test title 2”, :body => “Test body text
2…”,
:published_at => Date.today}].each{ |params| Article.create(params) }
At some point you might want to look into gems like factory_girl;
usually
used for testing, but could also be used to seed a development
environment
with a little more convenience.
Phil
On Wed, May 23, 2012 at 7:54 PM, captain awesome <
[email protected]> wrote:
Thank you
http://groups.google.com/group/rubyonrails-talk?hl=en.
–
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.