add category for showpage

This commit is contained in:
chiu 2025-11-12 13:24:14 +00:00
parent d85140127c
commit ff9331e58b
1 changed files with 1 additions and 0 deletions

View File

@ -827,6 +827,7 @@ class AnnouncementsController < ApplicationController
"update_user" => update_user,
"updated_at" => (announcement.postdate ? announcement.postdate.in_time_zone(Time.zone.utc_offset / 3600).strftime('%Y-%m-%d %H:%M') : ""),
"body" =>announcement.text,
"category" => (a.category.title rescue ""),
"image" => announcement.image.url,
"img_src" => img_src,
"img_description" => img_description,