instance method
create_or_update
Ruby on Rails 4.2.9
Since v3.0.20 PrivateSignature
create_or_update()
No documentation comment.
Source
# File activerecord/lib/active_record/persistence.rb, line 502
def create_or_update
raise ReadOnlyRecord, "#{self.class} is marked as readonly" if readonly?
result = new_record? ? _create_record : _update_record
result != false
end
Defined in activerecord/lib/active_record/persistence.rb line 502
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Persistence