On Aug 19, 10:00 am, James Englert <englert.ja...@gmail.com> wrote:
> Hey All,
>
> Two questions.
>
> Firstly, what is the difference between create and create!
>
> I see that create is document in the api
>
> http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M002269
>
> What is the difference between the two of these functions and where is the
> create! function defined.
>
> Also,
>
> What are the differences between these two calls?
>
> a)   SomeModel.create!{ :property_a => 'value', :property_b => 'value 2' }
> b)   SomeModel.create!({ :property_a => 'value', :property_b => 'value 2' })
>
> Thanks a lot for the help!
> -Jim


create! is here:

http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html

I find http://railsapi.com to be the best tool for browsing the Rails
documentation.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to