mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
use new reload-friendly API
This commit is contained in:
parent
6b13d74868
commit
80daa7006c
1 changed files with 3 additions and 3 deletions
|
@ -339,10 +339,10 @@ after_initialize do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Post.register_custom_field_type(DiscoursePoll::POLLS_CUSTOM_FIELD, :json)
|
register_post_custom_field_type(DiscoursePoll::POLLS_CUSTOM_FIELD, :json)
|
||||||
Post.register_custom_field_type(DiscoursePoll::VOTES_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]
|
user ? [DiscoursePoll::POLLS_CUSTOM_FIELD, DiscoursePoll::VOTES_CUSTOM_FIELD] : [DiscoursePoll::POLLS_CUSTOM_FIELD]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue