From f2aaabd6dd85b2e436d734c6420ae91e4599c347 Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Tue, 1 Mar 2016 20:10:14 -0300 Subject: [PATCH] oauth_client: fix association declaration --- plugins/oauth_client/lib/ext/profile.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/oauth_client/lib/ext/profile.rb b/plugins/oauth_client/lib/ext/profile.rb index c657b89..f0c1c65 100644 --- a/plugins/oauth_client/lib/ext/profile.rb +++ b/plugins/oauth_client/lib/ext/profile.rb @@ -1,10 +1,8 @@ require_dependency 'profile' -Profile.descendants.each do |subclass| - subclass.class_eval do +class Profile - has_many :oauth_auths, foreign_key: :profile_id, class_name: 'OauthClientPlugin::Auth', dependent: :destroy - has_many :oauth_providers, through: :oauth_auths, source: :provider + has_many :oauth_auths, foreign_key: :profile_id, class_name: 'OauthClientPlugin::Auth', dependent: :destroy + has_many :oauth_providers, through: :oauth_auths, source: :provider - end end -- libgit2 0.21.2