Skip to content
Snippets Groups Projects
Unverified Commit 17dc07f6 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix has_one association on Web::PushSubscription (#7767)

* Fix has_one association on Web::PushSubscription

* Fix code style issues
parent a043f8d2
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment