Skip to content

Commit

Permalink
Don't worry about filtering ActiveRecord::Base
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonkpils committed Sep 12, 2023
1 parent c2340a8 commit 41f8e5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ class << self
def gather_constants
# Collect all the classes that include ActiveModel::Validations
all_classes.select do |c|
c < ActiveModel::Validations &&
c.name.to_s != "ActiveRecord::Base"
c < ActiveModel::Validations
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ShopWithValidations
class ShopWithActiveRecord < ActiveRecord::Base
end
RUBY
assert_equal(["ShopWithActiveRecord", "ShopWithValidations"], gathered_constants)
assert_equal(["ActiveRecord::Base", "ShopWithActiveRecord", "ShopWithValidations"], gathered_constants)
end
end

Expand Down

0 comments on commit 41f8e5f

Please sign in to comment.