From 43365e4592a689e134c64d43f66d2db2b3d89df0 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 6 Apr 2016 19:06:30 +0800 Subject: [PATCH] patent title fixed --- app/controllers/personal_patents_controller.rb | 2 +- app/models/patent.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/personal_patents_controller.rb b/app/controllers/personal_patents_controller.rb index c171c25..cdab0ab 100644 --- a/app/controllers/personal_patents_controller.rb +++ b/app/controllers/personal_patents_controller.rb @@ -17,7 +17,7 @@ class PersonalPatentsController < ApplicationController t = [] fields_to_show.each do |fs| case fs - when "title" + when "patent_title" t << {"value" => "" + (patent.send(fs) rescue "") + ""} when "publish_date" t << {"value" => (patent.publish_date.strftime("%Y/%m/%d") rescue "")} diff --git a/app/models/patent.rb b/app/models/patent.rb index 565dc18..fe05999 100644 --- a/app/models/patent.rb +++ b/app/models/patent.rb @@ -87,7 +87,7 @@ class Patent pd_data = [] fields_to_show.collect do |t| case t - when "title" + when "patent_title" pd_data << {"data_title" => "" + (p.send(fs) rescue "") + ""} when "publish_date" pd_data << {"data_title" => (p.publish_date.strftime("%Y/%m/%d") rescue "")}