fix error

This commit is contained in:
chiu 2020-05-15 19:04:44 +08:00
parent 00c72c364b
commit ca16904b1f
2 changed files with 4 additions and 1 deletions

View File

@ -36,6 +36,9 @@ class Patent
scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc", :application_date => "desc", :publish_date => "desc") } scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc", :application_date => "desc", :publish_date => "desc") }
def member_profile():
super || (MemberProfile.find(self.member_profile_id) rescue nil)
end
def get_plugin_data(fields_to_show) def get_plugin_data(fields_to_show)
plugin_datas = [] plugin_datas = []
fields_to_show.each do |field| fields_to_show.each do |field|

View File

@ -57,7 +57,7 @@
</td> </td>
<td><%= patent.patent_no %></td> <td><%= patent.patent_no %></td>
<td><%= patent.patent_country %></td> <td><%= patent.patent_country %></td>
<td><%= patent.member_profile.name %></td> <td><%= Array(patent.member_profile).collect{|v| v.name}.join(' / ') %></td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>