From 16343a03be657cea7bf4311751e13d6254596475 Mon Sep 17 00:00:00 2001 From: Ruling-Mac Date: Wed, 21 Oct 2015 19:19:58 +0800 Subject: [PATCH] show page --- app/controllers/digital_archives_controller.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/controllers/digital_archives_controller.rb b/app/controllers/digital_archives_controller.rb index 96e6c30..a12c7ce 100644 --- a/app/controllers/digital_archives_controller.rb +++ b/app/controllers/digital_archives_controller.rb @@ -97,9 +97,9 @@ class DigitalArchivesController < ApplicationController } end end - + page = Page.where(:page_id => params[:page_id]).first rescue nil url = page.nil? ? "#" : "/#{I18n.locale.to_s}#{page.url}" - dca = { + dca = [{ "title" => (dca.title rescue ""), "item-date" => (dca.item_date rescue ""), "location" => (dca.location rescue ""), @@ -114,7 +114,7 @@ class DigitalArchivesController < ApplicationController "item-status" => (dca.item_status rescue ""), "album-content" => (dca.album_content rescue ""), "files" => dcafs - } + }] dcas = { "digital_content_archives" => dca, @@ -133,7 +133,5 @@ class DigitalArchivesController < ApplicationController "th_item_status" => t('digital_archive.item_status') } } - - end end \ No newline at end of file