FIX: incorrect localization in flagging dialog

- only happens when multiple locales enabled
This commit is contained in:
Sam 2015-10-19 11:42:33 +11:00
parent dc859beff3
commit dc10bdee3d
1 changed files with 2 additions and 2 deletions

View File

@ -28,13 +28,13 @@ class SiteSerializer < ApplicationSerializer
end
def post_action_types
cache_fragment("post_action_types") do
cache_fragment("post_action_types_#{I18n.locale}") do
ActiveModel::ArraySerializer.new(PostActionType.ordered).as_json
end
end
def topic_flag_types
cache_fragment("post_action_flag_types") do
cache_fragment("post_action_flag_types_#{I18n.locale}") do
flags = PostActionType.ordered.where(name_key: ['inappropriate', 'spam', 'notify_moderators'])
ActiveModel::ArraySerializer.new(flags, each_serializer: TopicFlagTypeSerializer).as_json
end