From 9e891605c5a73c49fa78792c2842ff4ba688f968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Sat, 4 Mar 2023 12:29:48 +0800 Subject: [PATCH] fix error --- app/models/journal_paper.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/models/journal_paper.rb b/app/models/journal_paper.rb index e8cd8cb..caaee3b 100644 --- a/app/models/journal_paper.rb +++ b/app/models/journal_paper.rb @@ -54,6 +54,8 @@ class JournalPaper scope :sort_year_date, ->{ order_by(:year => "desc", :publication_date => "desc", :id=>"desc") } scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc", :publication_date => "desc", :id=>"desc") } + alias_method :member_profiles, :member_profile + def create_link title = [] @@ -211,13 +213,8 @@ class JournalPaper plugin_datas end - def member_profile(only_one=true) - tmp = super() - only_one ? tmp.first : tmp - end - - def member_profiles - member_profile(false) + def member_profile() + member_profiles.first end def member_profile=(mp)