update field
This commit is contained in:
parent
fb265947d0
commit
d4ce2c1b75
|
@ -30,7 +30,7 @@ class PersonalPatentsController < ApplicationController
|
||||||
plugin = Patent.where(:is_hidden=>false).find_by(uid: params[:uid])
|
plugin = Patent.where(:is_hidden=>false).find_by(uid: params[:uid])
|
||||||
fields_to_show = [
|
fields_to_show = [
|
||||||
"patent_title",
|
"patent_title",
|
||||||
"patent_type",
|
"patent_category",
|
||||||
"authors",
|
"authors",
|
||||||
"year",
|
"year",
|
||||||
"language",
|
"language",
|
||||||
|
|
|
@ -41,6 +41,8 @@ class Patent
|
||||||
|
|
||||||
def get_plugin_field_data(field)
|
def get_plugin_field_data(field)
|
||||||
case field
|
case field
|
||||||
|
when "patent_category"
|
||||||
|
value = self.patent_types.collect{|patent_type| patent_type.title}.join(',') rescue ""
|
||||||
when "file"
|
when "file"
|
||||||
files = []
|
files = []
|
||||||
self.patent_files.each do |patent_file|
|
self.patent_files.each do |patent_file|
|
||||||
|
|
Loading…
Reference in New Issue