From 80daa7006c274bbbffd6b706d3d3c2d80ebefcef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Sat, 12 Aug 2017 04:22:44 +0200 Subject: [PATCH] use new reload-friendly API --- plugins/poll/plugin.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/poll/plugin.rb b/plugins/poll/plugin.rb index 33709ecb0f5..c8d0cf8d051 100644 --- a/plugins/poll/plugin.rb +++ b/plugins/poll/plugin.rb @@ -339,10 +339,10 @@ after_initialize do end end - Post.register_custom_field_type(DiscoursePoll::POLLS_CUSTOM_FIELD, :json) - Post.register_custom_field_type(DiscoursePoll::VOTES_CUSTOM_FIELD, :json) + register_post_custom_field_type(DiscoursePoll::POLLS_CUSTOM_FIELD, :json) + register_post_custom_field_type(DiscoursePoll::VOTES_CUSTOM_FIELD, :json) - TopicView.add_post_custom_fields_whitelister do |user| + topic_view_post_custom_fields_whitelister do |user| user ? [DiscoursePoll::POLLS_CUSTOM_FIELD, DiscoursePoll::VOTES_CUSTOM_FIELD] : [DiscoursePoll::POLLS_CUSTOM_FIELD] end