diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-11-17 02:06:26 +0100 |
---|---|---|
committer | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-11-17 10:06:26 +0900 |
commit | 3e90987c8b0c620b6fc104350b8eb16d17d7e80a (patch) | |
tree | f9543483601434d0980c2829606c2aa45861c4ac /app/models | |
parent | 2151fd315023a7f6849c6c9a519cd01deac09aa1 (diff) |
Fix some rubocop style issues (#5730)
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/web/push_subscription.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/web/push_subscription.rb b/app/models/web/push_subscription.rb index da67e7665..a41906227 100644 --- a/app/models/web/push_subscription.rb +++ b/app/models/web/push_subscription.rb @@ -24,12 +24,12 @@ class Web::PushSubscription < ApplicationRecord end def pushable?(notification) - data && data.key?('alerts') && data['alerts'][notification.type.to_s] + data&.key?('alerts') && data['alerts'][notification.type.to_s] end def as_payload payload = { id: id, endpoint: endpoint } - payload[:alerts] = data['alerts'] if data && data.key?('alerts') + payload[:alerts] = data['alerts'] if data&.key?('alerts') payload end |