fix view count

This commit is contained in:
nccu 2015-01-13 17:12:08 +08:00
parent 59cf9f51e8
commit 3a166408e6
1 changed files with 2 additions and 1 deletions

View File

@ -225,7 +225,8 @@ class AnnouncementsController < ApplicationController
"body" =>announcement.text,
"image" => announcement.image.url,
"dept_link" => "/#{I18n.locale.to_s + page.url}/?unit=#{announcement.cache_dept}",
"cache_dept" => announcement.cache_dept
"cache_dept" => announcement.cache_dept,
"view_count" =>announcement.view_count
},
"impressionist" => (announcement.is_preview ? nil : announcement),
"url_to_edit"=>url_to_edit