diff --git a/app/controllers/personal_journals_controller.rb b/app/controllers/personal_journals_controller.rb index 41d94ee..a112c4d 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -9,7 +9,7 @@ class PersonalJournalsController < ApplicationController journal_paper_query = journal_paper_query.where(:year.in => page.year.to_a ) end if (!page.journal_type.blank? rescue false) - journal_paper_query = journal_paper_query.where(:journal_type_id.in => page.journal_type.to_a ) + journal_paper_query = journal_paper_query.where(:journal_type_ids.in => page.journal_type.to_a ) end journal_papers = journal_paper_query.page(OrbitHelper.params[:page_no]).per(page_data_count) page = Page.where(page_id: params[:page_id]).first rescue nil diff --git a/app/models/journal_paper.rb b/app/models/journal_paper.rb index b63177f..9a92627 100644 --- a/app/models/journal_paper.rb +++ b/app/models/journal_paper.rb @@ -33,7 +33,7 @@ class JournalPaper #relations belongs_to :member_profile belongs_to :journal_paper_type - belongs_to :journal_type + has_and_belongs_to_many :journal_types has_and_belongs_to_many :journal_levels diff --git a/app/views/admin/journal_papers/_form.html.erb b/app/views/admin/journal_papers/_form.html.erb index 87fc8d5..70964c1 100644 --- a/app/views/admin/journal_papers/_form.html.erb +++ b/app/views/admin/journal_papers/_form.html.erb @@ -201,7 +201,7 @@