Skip to content

Commit 179c580

Browse files
author
Kyle d'Oliveira
committed
Also mark the association as loaded
1 parent c1f717a commit 179c580

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/polymorphic_integer_type/extensions.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def belongs_to(name, scope = nil, **options)
4646
define_method "#{name}=" do |record|
4747
super(record)
4848
send("#{foreign_type}=", record.class)
49+
association(name).loaded!
4950
end
5051
end
5152

0 commit comments

Comments
 (0)