diff --git a/app/views/research/journal/volumes/_volume.json.jbuilder b/app/views/research/journal/volumes/_volume.json.jbuilder deleted file mode 100644 index e53ca16927d5ee252fa12e2449da6320f8b71ec0..0000000000000000000000000000000000000000 --- a/app/views/research/journal/volumes/_volume.json.jbuilder +++ /dev/null @@ -1,2 +0,0 @@ -json.extract! volume, :id, :title, :number, :published_at, :created_at, :updated_at -json.url research_journal_volume_url(journal: volume.journal, id: volume, format: :json) diff --git a/app/views/research/journal/volumes/index.json.jbuilder b/app/views/research/journal/volumes/index.json.jbuilder index bb11ceb642e643965343a584d9fd6d244e77cb7c..3894f90d2aa95cf8534049e700195c241341ec18 100644 --- a/app/views/research/journal/volumes/index.json.jbuilder +++ b/app/views/research/journal/volumes/index.json.jbuilder @@ -1 +1,4 @@ -json.array! @research_journal_volumes, partial: "research_journal_volumes/research_journal_volume", as: :research_journal_volume +json.array! @volumes do |volume| + json.extract! volume, :id, :title, :number, :published_at + json.url research_journal_volume_url(journal_id: volume.journal, id: volume, format: :json) +end diff --git a/app/views/research/journal/volumes/show.json.jbuilder b/app/views/research/journal/volumes/show.json.jbuilder index 5795a060c4aaddd06972c50c54d30b45200cf1ac..3ae703e7d7e78771e700f4b59c8ffe87a2802f4d 100644 --- a/app/views/research/journal/volumes/show.json.jbuilder +++ b/app/views/research/journal/volumes/show.json.jbuilder @@ -1 +1,2 @@ -json.partial! "research/journal/volumes/volume", volume: @volume +json.extract! @volume, :id, :title, :number, :published_at, :created_at, :updated_at +json.url research_journal_volume_url(journal: @volume.journal, id: @volume, format: :json)