Skip to content

Commit ceda3ec

Browse files
committed
[B] Fix journal subject fetch
1 parent e1f72ab commit ceda3ec

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

api/app/models/subject.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ class Subject < ApplicationRecord
1313
has_many :text_subjects, dependent: :destroy
1414
has_many :project_subjects, dependent: :destroy
1515
has_many :project_collection_subjects, dependent: :destroy
16+
has_many :journal_subjects, dependent: :destroy
1617
has_many :texts, through: :text_subjects
1718
has_many :projects, through: :project_subjects
1819
has_many :project_collections, through: :project_collection_subjects
20+
has_many :journals, through: :journal_subjects
1921

2022
scope :by_featured, lambda { |featured|
2123
return all unless featured.present?

client/src/frontend/containers/Frontend/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class FrontendContainer extends Component {
3030
{ oneTime: true }
3131
);
3232
const journalSubjects = request(
33-
subjectsAPI.index({ journalUsed: true }, {}, true),
33+
subjectsAPI.index({ usedJournal: true }, {}, true),
3434
requests.feJournalSubjects,
3535
{ oneTime: true }
3636
);

0 commit comments

Comments
 (0)