about summary refs log tree commit diff
path: root/app/models/web
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-06-09 21:11:14 +0200
committerGitHub <noreply@github.com>2018-06-09 21:11:14 +0200
commit17dc07f66793e40138531d46e9043b459fb31f43 (patch)
tree08e052761f139d36105288b6d4ccc48b17f21f0e /app/models/web
parenta043f8d27747ded9a5636d14aff36d7d4ffbac18 (diff)
Fix has_one association on Web::PushSubscription (#7767)
* Fix has_one association on Web::PushSubscription

* Fix code style issues
Diffstat (limited to 'app/models/web')
-rw-r--r--app/models/web/push_subscription.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/web/push_subscription.rb b/app/models/web/push_subscription.rb
index 867bc9519..d19b20c48 100644
--- a/app/models/web/push_subscription.rb
+++ b/app/models/web/push_subscription.rb
@@ -18,7 +18,7 @@ class Web::PushSubscription < ApplicationRecord
   belongs_to :user, optional: true
   belongs_to :access_token, class_name: 'Doorkeeper::AccessToken', optional: true
 
-  has_one :session_activation
+  has_one :session_activation, foreign_key: 'web_push_subscription_id', inverse_of: :web_push_subscription
 
   def push(notification)
     I18n.with_locale(associated_user&.locale || I18n.default_locale) do