Update personal_journals_controller.rb
This commit is contained in:
parent
f811f12a43
commit
b70f60243e
|
@ -21,7 +21,7 @@ class PersonalJournalsController < ApplicationController
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
if params[:selectbox] !=nil
|
if params[:selectbox] !=nil
|
||||||
journal_papers = Mongoid::Sessions.default[:journal_papers].find()
|
journal_papers = JournalPaper.where(:is_hidden=>false)#Mongoid::Sessions.default[:journal_papers].find()
|
||||||
journal_papers_count = journal_papers.count
|
journal_papers_count = journal_papers.count
|
||||||
journal_papers_temp = journal_papers.take(journal_papers_count).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] }
|
journal_papers_temp = journal_papers.take(journal_papers_count).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] }
|
||||||
journal_papers_show = journal_papers_temp.select {|value| value[params[:selectbox]][params[:locale]].include? params[:keywords]}
|
journal_papers_show = journal_papers_temp.select {|value| value[params[:selectbox]][params[:locale]].include? params[:keywords]}
|
||||||
|
|
Loading…
Reference in New Issue