Skip to content

Commit

Permalink
Update active_record_relations.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
nsatohiro authored Mar 20, 2024
1 parent dead042 commit 3a5ea9f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/tapioca/dsl/compilers/active_record_relations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -701,21 +701,19 @@ def create_common_methods
when :first, :last, :take
sigs = [
common_relation_methods_module.create_sig(
# method_name,
parameters: [create_opt_param("limit", type: "NilClass", default: "nil")],
return_type: as_nilable_type(constant_name),
),
common_relation_methods_module.create_sig(
parameters: [create_param("limit", type: "Integer")],
# create_opt_param("limit", type: "T.untyped", default: "nil"),
return_type: "T::Array[#{constant_name}]",
),
]
common_relation_methods_module.create_method_with_sigs(
method_name.to_s,
sigs: sigs,
parameters: [RBI::OptParam.new("limit", "nil")],
# )
)
when :raise_record_not_found_exception!
# skip
else
Expand Down

0 comments on commit 3a5ea9f

Please sign in to comment.