FEATURE: ?include_raw parameter for /t/id/posts.json

include_raw is not added for the wordpress view because it uses the
BasicPostSerializer, and is not a one-line change.

This is the only use of the TopicViewPostsSerializer class, and the
previous change covered the only use of the TopicViewSerializer class.
No other locations include the PostStreamSerializerMixin. Therefore,
this feature is most likely complete.
This commit is contained in:
riking 2014-11-07 07:28:07 -08:00
parent 067f552cd5
commit d7a4e39e1d

View File

@ -110,7 +110,7 @@ class TopicsController < ApplicationController
params.require(:post_ids)
@topic_view = TopicView.new(params[:topic_id], current_user, post_ids: params[:post_ids])
render_json_dump(TopicViewPostsSerializer.new(@topic_view, scope: guardian, root: false))
render_json_dump(TopicViewPostsSerializer.new(@topic_view, scope: guardian, root: false, include_raw: !!params[:include_raw]))
end
def destroy_timings