From cdca57b7d4069db54ed3457da92a2477ec017ecc Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Thu, 12 Oct 2023 00:58:16 +0900 Subject: [PATCH] activerecord: Add ActiveRecord::Base.sum --- gems/activerecord/6.0/activerecord.rbs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gems/activerecord/6.0/activerecord.rbs b/gems/activerecord/6.0/activerecord.rbs index 69f24fd3c..95cc0820a 100644 --- a/gems/activerecord/6.0/activerecord.rbs +++ b/gems/activerecord/6.0/activerecord.rbs @@ -353,6 +353,7 @@ interface _ActiveRecord_Relation[Model, PrimaryKey] def find_each: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Model) -> void } -> nil def find_in_batches: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Array[Model]) -> void } -> nil def in_batches: (?of: Integer, ?start: Integer, ?finish: Integer, ?load: bool, ?error_on_ignore: bool, ?order: untyped) { (self) -> void } -> nil + def sum: (?untyped? column_name) -> Integer def destroy_all: () -> untyped def delete_all: () -> untyped def update_all: (*untyped) -> untyped @@ -435,6 +436,7 @@ interface _ActiveRecord_Relation_ClassMethods[Model, Relation, PrimaryKey] def find_each: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Model) -> void } -> nil def find_in_batches: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Array[Model]) -> void } -> nil def in_batches: (?of: Integer, ?start: Integer, ?finish: Integer, ?load: bool, ?error_on_ignore: bool, ?order: untyped) { (Relation) -> void } -> nil + def sum: (?untyped? column_name) -> Integer def destroy_all: () -> untyped def delete_all: () -> untyped def update_all: (*untyped) -> untyped