forked from saurabh/personal-journal
Update personal_journals_controller.rb
This commit is contained in:
parent
bdfbb40863
commit
1b4f589d41
|
@ -25,6 +25,9 @@ class PersonalJournalsController < ApplicationController
|
|||
journal_papers_count = journal_papers.count
|
||||
journal_papers_temp = Mongoid::Sessions.default[:journal_papers].find().take(journal_papers_count)
|
||||
journal_papers_show = journal_papers_temp.select {|value| value[params[:selectbox]].include? params[:keywords]}
|
||||
{
|
||||
"all" => journal_papers_show
|
||||
}
|
||||
else
|
||||
journal_paper_list = []
|
||||
journal_papers.each do |journal_paper|
|
||||
|
@ -75,11 +78,6 @@ class PersonalJournalsController < ApplicationController
|
|||
"all" => journal_papers_temp
|
||||
}
|
||||
end
|
||||
if params[:selectbox] !=nil
|
||||
{
|
||||
"all" => journal_papers_show
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
Loading…
Reference in New Issue