Skip to content

Commit d7d7211

Browse files
committed
[ci skip] add created_at and updated_at to example
1 parent 9b6b32a commit d7d7211

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activerecord/lib/active_record/attribute_assignment.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ module AttributeAssignment
1313
# exception is raised.
1414
#
1515
# cat = Cat.new(name: "Gorby", status: "yawning")
16-
# cat.attributes # => { "name" => "Gorby", "status" => "yawning" }
16+
# cat.attributes # => { "name" => "Gorby", "status" => "yawning", "created_at" => nil, "updated_at" => nil}
1717
# cat.assign_attributes(status: "sleeping")
18-
# cat.attributes # => { "name" => "Gorby", "status" => "sleeping" }
18+
# cat.attributes # => { "name" => "Gorby", "status" => "sleeping", "created_at" => nil, "updated_at" => nil }
1919
#
2020
# New attributes will be persisted in the database when the object is saved.
2121
#

0 commit comments

Comments
 (0)