Update journal_papers_controller.rb

This commit is contained in:
chiu 2019-11-01 20:48:40 +08:00
parent 0392c1a8d7
commit 42088a1472
1 changed files with 1 additions and 1 deletions

View File

@ -10,6 +10,7 @@ class Admin::JournalPapersController < OrbitMemberController
before_action :need_access_right before_action :need_access_right
before_action :allow_admin_only, :only => [:index, :setting] before_action :allow_admin_only, :only => [:index, :setting]
def merge def merge
puts ['id',params['journal_id']]
@journals=JournalPaper.order_by(:year=>'desc').map{|value| value}.group_by{|v| [v[:paper_title],v[:journal_title]]} @journals=JournalPaper.order_by(:year=>'desc').map{|value| value}.group_by{|v| [v[:paper_title],v[:journal_title]]}
@journals.each do |key,value| @journals.each do |key,value|
if value.length==1 if value.length==1
@ -40,7 +41,6 @@ class Admin::JournalPapersController < OrbitMemberController
end end
end end
end end
puts ['hi',@journals]
end end
def index def index
@writing_journals = JournalPaper.order_by(:year=>'desc').page(params[:page]).per(10) @writing_journals = JournalPaper.order_by(:year=>'desc').page(params[:page]).per(10)