From 8b8e5f4cb28286b658ddcf448fc49c17f76d6b93 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 4 Aug 2017 15:30:30 +0800 Subject: [PATCH] added some stuff and fixes --- app/controllers/e_papers_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/e_papers_controller.rb b/app/controllers/e_papers_controller.rb index acf25a1..6ecd35c 100644 --- a/app/controllers/e_papers_controller.rb +++ b/app/controllers/e_papers_controller.rb @@ -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 {