forked from saurabh/personal-journal
Update personal_journals_controller.rb
This commit is contained in:
parent
5aa2f7966e
commit
1769d9008f
|
@ -37,7 +37,7 @@ class PersonalJournalsController < ApplicationController
|
||||||
when "author_type"
|
when "author_type"
|
||||||
journal_papers_show = journal_papers_temp.select {|value| search_all_words(value.journal_paper_author_types.collect{|jat| jat.title}.join(", "), params[:keywords])}
|
journal_papers_show = journal_papers_temp.select {|value| search_all_words(value.journal_paper_author_types.collect{|jat| jat.title}.join(", "), params[:keywords])}
|
||||||
when "paper_type"
|
when "paper_type"
|
||||||
journal_papers_show = journal_papers_temp.select {|value| search_all_words(value.journal_paper_types.collect{|x| x.title}.join(", "), params[:keywords])}
|
journal_papers_show = journal_papers_temp.select {|value| search_all_words(value.journal_paper_type.collect{|x| x.title}.join(", "), params[:keywords])}
|
||||||
when "language"
|
when "language"
|
||||||
journal_papers_show = journal_papers_temp.select {|value| search_all_words((!value.language.nil? ? t("#{value.language}") : ""), params[:keywords])}
|
journal_papers_show = journal_papers_temp.select {|value| search_all_words((!value.language.nil? ? t("#{value.language}") : ""), params[:keywords])}
|
||||||
else
|
else
|
||||||
|
@ -71,7 +71,7 @@ class PersonalJournalsController < ApplicationController
|
||||||
when "author_type"
|
when "author_type"
|
||||||
t << {"value" => (journal_paper.journal_paper_author_types.collect{|jat| jat.title}.join(", ") rescue "")}
|
t << {"value" => (journal_paper.journal_paper_author_types.collect{|jat| jat.title}.join(", ") rescue "")}
|
||||||
when "paper_type"
|
when "paper_type"
|
||||||
t << {"value" => (journal_paper.journal_paper_types.collect{|x| x.title}.join(', ') rescue "")}
|
t << {"value" => (journal_paper.journal_paper_type.collect{|x| x.title}.join(', ') rescue "")}
|
||||||
when "language"
|
when "language"
|
||||||
t << {"value" => (!journal_paper.language.nil? ? t("#{journal_paper.language}") : "")}
|
t << {"value" => (!journal_paper.language.nil? ? t("#{journal_paper.language}") : "")}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue