Module: Babik::QuerySet::Updatable

Included in:
AbstractBase
Defined in:
lib/babik/queryset/mixins/updatable.rb

Overview

Functionality related to the UPDATE operation

Instance Method Summary collapse

Instance Method Details

#update(update_command) ⇒ Object

Runs the update

Parameters:

  • update_command (Hash{field: value})

    Runs the update query.



9
10
11
# File 'lib/babik/queryset/mixins/updatable.rb', line 9

def update(update_command)
  self.model.connection.execute(sql.update(update_command))
end