Anda dapat menggunakan cmd_tuples
metode:
sql = "UPDATE users SET updated_at = '#{DateTime.now}' WHERE id = 1"
ActiveRecord::Base.connection.execute(sql).cmd_tuples
# => 1
Dokumentasi:http://www.rubydoc.info/gems /pg/0.17.1/PG%2FRHasil:cmd_tuples