We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fa4944 commit a4974a3Copy full SHA for a4974a3
app/services/forest_liana/schema_utils.rb
@@ -2,9 +2,14 @@ module ForestLiana
2
class SchemaUtils
3
4
def self.associations(active_record_class)
5
- active_record_class
6
- .reflect_on_all_associations
7
- .select { |association| !polymorphic?(association) && !is_active_type?(association.klass) }
+ active_record_class.reflect_on_all_associations.select do |association|
+ begin
+ !polymorphic?(association) && !is_active_type?(association.klass)
8
+ rescue
9
+ FOREST_LOGGER.warn "Unknown association #{association.name} on class #{active_record_class.name}"
10
+ false
11
+ end
12
13
end
14
15
def self.one_associations(active_record_class)
0 commit comments