Created
August 15, 2019 18:41
-
-
Save stevenjackson/411de90edff6137c8de1951750ed1f82 to your computer and use it in GitHub Desktop.
ActiveRecord::HasManyThroughOrderError detector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ApplicationRecord.descendants.each do |model| | |
model.reflect_on_all_associations.each do |relation| | |
model.first&.send(relation.name) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment