Vous pouvez utiliser cmd_tuples
méthode :
sql = "UPDATE users SET updated_at = '#{DateTime.now}' WHERE id = 1"
ActiveRecord::Base.connection.execute(sql).cmd_tuples
# => 1
Documentation :http://www.rubydoc.info/gems /pg/0.17.1/PG%2FResult:cmd_tuples