From ea3d01c2f1cb138bf87ef98d023d8430e915d5f9 Mon Sep 17 00:00:00 2001 From: Young Hoon Kim Date: Sat, 8 Nov 2014 15:57:37 +0900 Subject: [PATCH] feat:using simple_format in notice_draper --- app/decorators/notice_decorator.rb | 3 +++ app/views/notices/show.html.erb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/decorators/notice_decorator.rb b/app/decorators/notice_decorator.rb index b7c486d..ecd65de 100644 --- a/app/decorators/notice_decorator.rb +++ b/app/decorators/notice_decorator.rb @@ -17,4 +17,7 @@ def survey_due_date (object.due_date - 3.days).localtime.strftime("%Y-%m-%d %T") end + def content + h.simple_format(object.content) + end end diff --git a/app/views/notices/show.html.erb b/app/views/notices/show.html.erb index 654741e..da8c0f5 100644 --- a/app/views/notices/show.html.erb +++ b/app/views/notices/show.html.erb @@ -13,7 +13,7 @@

내용

-

<%= @notice.content %>

+
<%= @notice.content %>