added some stuff and fixes

This commit is contained in:
Harry Bomrah 2017-08-04 15:30:30 +08:00
parent 97a18a4a37
commit 8b8e5f4cb2
1 changed files with 4 additions and 1 deletions

View File

@ -51,10 +51,13 @@ class EPapersController < ApplicationController
paper = Paper.find_by(:uid => params[:uid])
topics = paper.topics.collect do |topic|
desc = ActionView::Helpers::SanitizeHelper.strip_tags(topic.content)
{
"link_to_show" => OrbitHelper.url_to_show(topic.to_param) + "?method=showtopic",
"episode" => topic.episode,
"publish_date" => topic.created_at
"content" => topic.content,
"description" => desc[0..100],
"publish_date" => topic.created_at.strftime("%Y-%m-%d")
}
end
{