Yes. An ActiveRecord object in Rails retains its identity in the ID parameter. If the ID is set, Rails will know to update the record in the database with that ID.
save
is, in fact, the primary way to create, update, or in any way save an object to the database. Other methods like update_attributes
are just sugar that use save
at their core.