Method: ModelClass#update_or_create_records
- Defined in:
- lib/model/the_class.rb
#update_or_create_records(set: {}, where: {}, **args, &b) ⇒ Object Also known as: update_or_create_documents
Create a new Instance of the Class with the applied attributes if does not exists, otherwise update it. It returns the freshly instantiated Objects
199 200 201 |
# File 'lib/model/the_class.rb', line 199 def update_or_create_records set: {}, where: {}, **args, &b db.update_or_create_records self, set: set, where: where, **args, &b end |