Skip to content

Commit

Permalink
Merge pull request #1101 from Shopify/revert-1089-typed-active-record…
Browse files Browse the repository at this point in the history
…-find

Revert "Make ActiveRecord#find return value typed"
  • Loading branch information
paracycle authored Aug 8, 2022
2 parents a51936a + 5bab738 commit 285b5e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/tapioca/dsl/compilers/active_record_relations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def create_common_methods(common_relation_methods_module)
parameters: [
create_rest_param("args", type: "T.untyped"),
],
return_type: "T.any(#{constant_name}, T::Array[#{constant_name}])"
return_type: "T.untyped"
)
when :find_by
create_common_method(
Expand Down
2 changes: 1 addition & 1 deletion spec/tapioca/dsl/compilers/active_record_relations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def fifth; end
sig { returns(::Post) }
def fifth!; end
sig { params(args: T.untyped).returns(T.any(::Post, T::Array[::Post])) }
sig { params(args: T.untyped).returns(T.untyped) }
def find(*args); end
sig { params(args: T.untyped).returns(T.nilable(::Post)) }
Expand Down

0 comments on commit 285b5e5

Please sign in to comment.