diff --git a/app/models/profile.rb b/app/models/profile.rb index 6fb2a5e..ada6a69 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -250,7 +250,7 @@ class Profile < ApplicationRecord has_many :email_templates, :foreign_key => :owner_id has_many :profile_followers - has_many :followers, :class_name => 'Person', :through => :profile_followers, :source => :person + has_many :followers, -> { uniq }, :class_name => 'Person', :through => :profile_followers, :source => :person # Although this should be a has_one relation, there are no non-silly names for # a foreign key on article to reference the template to which it is -- libgit2 0.21.2