Method: ActiveRecord::ConnectionAdapters::DatabaseStatements#update

Defined in:
activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb

#update(arel, name = nil, binds = []) ⇒ Object

Executes the update statement and returns the number of rows affected.



206
207
208
209
# File 'activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb', line 206

def update(arel, name = nil, binds = [])
  sql, binds = to_sql_and_binds(arel, binds)
  exec_update(sql, name, binds)
end