method
create
v1.0.0 -
Show latest stable
-
3 notes -
Class: ActiveRecord::Base
- 1.0.0 (0)
- 1.1.6 (0)
- 1.2.6 (0)
- 2.0.3 (11)
- 2.1.0 (11)
- 2.2.1 (0)
- 2.3.8 (0)
- 3.0.0 (0)
- 3.0.9 (-1)
- 3.1.0 (13)
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
create(attributes = nil)
public
Creates an object, instantly saves it as a record (if the validation permits it), and returns it. If the save fails under validations, the unsaved object is still returned.
Register or
log in
to add new notes.
sfusion -
December 13, 2009
1 thank
yijisoo -
December 13, 2009
0 thanks
What's difference between create and new?
What’s difference between create and new?
roryokane -
May 25, 2016 - (v1.0.0 - v3.1.0)
0 thanks
Where this method moved to
After v3.1.0, this method moved to ActiveRecord::Persistence::ClassMethods#create .