update field

This commit is contained in:
manson 2014-08-11 20:08:29 +08:00
parent fb265947d0
commit d4ce2c1b75
2 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class PersonalPatentsController < ApplicationController
plugin = Patent.where(:is_hidden=>false).find_by(uid: params[:uid])
fields_to_show = [
"patent_title",
"patent_type",
"patent_category",
"authors",
"year",
"language",

View File

@ -41,6 +41,8 @@ class Patent
def get_plugin_field_data(field)
case field
when "patent_category"
value = self.patent_types.collect{|patent_type| patent_type.title}.join(',') rescue ""
when "file"
files = []
self.patent_files.each do |patent_file|