Skip to content

Commit

Permalink
Support Rails 5+ attributes api for virtual attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 authored and LuCCoelho committed Jun 11, 2024
1 parent 8b67fb0 commit e6683c9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def column_types(attr)
if klass.respond_to?(:attribute_types)
klass.attribute_types[attr].type
else
klass.columns.detect { |column| column.name == attr }.try(:type)
klass.columns.find { |column| column.name == attr }.try(:type)
end
end

Expand Down

0 comments on commit e6683c9

Please sign in to comment.