From bfa7f9ebf22581a387606716fe3f86e85e1c9db5 Mon Sep 17 00:00:00 2001 From: unarist Date: Sat, 2 Sep 2017 23:50:42 +0900 Subject: Fix WebPush (regression from #4524) (#4778) * Fix NoMethodError in Web::PushSubscription ``` undefined method `site_contact_email' for # /usr/local/bundle/gems/activerecord-5.1.3/lib/active_record/dynamic_matchers.rb:22:in `method_missing' /usr/local/bundle/gems/attr_encrypted-3.0.3/lib/attr_encrypted.rb:295:in `method_missing' /usr/local/bundle/gems/attr_encrypted-3.0.3/lib/attr_encrypted/adapters/active_record.rb:129:in `method_missing_with_attr_encrypted' /mastodon/app/models/web/push_subscription.rb:53:in `push_payload' ``` * Specify serializer in Web::NotificationSerializer --- app/serializers/web/notification_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/serializers/web') diff --git a/app/serializers/web/notification_serializer.rb b/app/serializers/web/notification_serializer.rb index 21a09f01e..e5524fe7a 100644 --- a/app/serializers/web/notification_serializer.rb +++ b/app/serializers/web/notification_serializer.rb @@ -121,7 +121,7 @@ class Web::NotificationSerializer < ActiveModel::Serializer attributes :title, :image, :badge, :tag, :timestamp, :icon - has_one :data + has_one :data, serializer: DataSerializer def title case object.type -- cgit