Commit f2aaabd6dd85b2e436d734c6420ae91e4599c347

Authored by Braulio Bhavamitra
1 parent 57b1d9ce

oauth_client: fix association declaration

Showing 1 changed file with 3 additions and 5 deletions   Show diff stats
plugins/oauth_client/lib/ext/profile.rb
1 1 require_dependency 'profile'
2 2  
3   -Profile.descendants.each do |subclass|
4   - subclass.class_eval do
  3 +class Profile
5 4  
6   - has_many :oauth_auths, foreign_key: :profile_id, class_name: 'OauthClientPlugin::Auth', dependent: :destroy
7   - has_many :oauth_providers, through: :oauth_auths, source: :provider
  5 + has_many :oauth_auths, foreign_key: :profile_id, class_name: 'OauthClientPlugin::Auth', dependent: :destroy
  6 + has_many :oauth_providers, through: :oauth_auths, source: :provider
8 7  
9   - end
10 8 end
... ...