forked from saurabh/personal-journal
Update personal_journals_controller.rb
This commit is contained in:
parent
ab799420b0
commit
4687a11645
|
@ -20,11 +20,11 @@ class PersonalJournalsController < ApplicationController
|
||||||
"paper_title"
|
"paper_title"
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
if params.selectbox !=nil
|
#if params.selectbox !=nil
|
||||||
# journal_papers = Mongoid::Sessions.default[:journal_papers].find()
|
# journal_papers = Mongoid::Sessions.default[:journal_papers].find()
|
||||||
# journal_papers_count = journal_papers.count
|
# journal_papers_count = journal_papers.count
|
||||||
# journal_papers_temp = Mongoid::Sessions.default[:journal_papers].find().take(journal_papers_count)
|
# journal_papers_temp = Mongoid::Sessions.default[:journal_papers].find().take(journal_papers_count)
|
||||||
else
|
#else
|
||||||
journal_paper_list = []
|
journal_paper_list = []
|
||||||
journal_papers.each do |journal_paper|
|
journal_papers.each do |journal_paper|
|
||||||
t = []
|
t = []
|
||||||
|
@ -48,7 +48,7 @@ class PersonalJournalsController < ApplicationController
|
||||||
end
|
end
|
||||||
journal_paper_list << {"jps" => t}
|
journal_paper_list << {"jps" => t}
|
||||||
end
|
end
|
||||||
end
|
#end
|
||||||
headers = []
|
headers = []
|
||||||
choice_show = []
|
choice_show = []
|
||||||
fields_to_show.each do |fs|
|
fields_to_show.each do |fs|
|
||||||
|
@ -71,7 +71,7 @@ class PersonalJournalsController < ApplicationController
|
||||||
"total_pages" => journal_papers.total_pages,
|
"total_pages" => journal_papers.total_pages,
|
||||||
"choice" => {"choice_value" => choice_value ,"choice_show" => choice_show},
|
"choice" => {"choice_value" => choice_value ,"choice_show" => choice_show},
|
||||||
"url" => "/"+params[:locale]+params[:url],
|
"url" => "/"+params[:locale]+params[:url],
|
||||||
"all" => Mongoid::Sessions.default[:journal_papers].find().take(2)
|
"all" => params.selectbox
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue