Skip to content

Commit e4350f6

Browse files
authored
Merge pull request rails#49101 from xfifix/fix/sti_class_name
[Fix rails#48925] fix "class_name" required for STI class
2 parents bb52c41 + 14a34c7 commit e4350f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/table_metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def type(column_name)
1919
end
2020

2121
def has_column?(column_name)
22-
klass&.columns_hash.key?(column_name)
22+
klass&.columns_hash&.key?(column_name)
2323
end
2424

2525
def associated_with?(table_name)

0 commit comments

Comments
 (0)