method
create_or_update
v5.2.3 -
Show latest stable
- Class:
ActiveRecord::Persistence
create_or_update(*args, &block)private
No documentation available.
# File activerecord/lib/active_record/persistence.rb, line 702
def create_or_update(*args, &block)
_raise_readonly_record_error if readonly?
return false if destroyed?
result = new_record? ? _create_record(&block) : _update_record(*args, &block)
result != false
end