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 Crissman <phil.crissman@gmail.com>
Date: Thu, May 24, 2012 at 11:40 PM
Subject: Re: [Rails] Help with inserting multiple records via console
To: rubyonrails-talk@googlegroups.com


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 wrote:

I'm fairly new to Rails and was wondering would it be possible to insert
multiple records via the console?

I tried variations along the lines of this but all failed.
Article.create {: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}

If this is possible, please help.

Thank you

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/R1JqmUkh-J8J.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Manny 777 at May 26, 2012 at 9:06 am
    Take a look at http://startup-talents.com/, may help you.

    --
    Posted via http://www.ruby-forum.com/.

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Okpala Ikenna N. at Oct 17, 2012 at 2:24 pm
    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

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMay 25, '12 at 8:09a
activeOct 17, '12 at 2:24p
posts3
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Okpala Ikenna N.: 2 posts Manny 777: 1 post

People

Translate

site design / logo © 2021 Grokbase