Skip to content

Commit

Permalink
Update lib/global_id/global_id.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
  • Loading branch information
adrianna-chang-shopify and byroot authored Aug 28, 2023
1 parent 81fbe0d commit 5cf6818
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/global_id/global_id.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ def model_class
@model_class ||= begin
model = model_name.constantize

unless model <= GlobalID
model
else
if model <= GlobalID
raise ArgumentError, "GlobalID and SignedGlobalID cannot be used as model_class."
end
model
end
end

Expand Down

0 comments on commit 5cf6818

Please sign in to comment.