Fix version chooser for annotations page

This commit is contained in:
Amaia Castro
2017-01-11 20:14:20 +01:00
parent 306e3fa59f
commit a56898fed7
3 changed files with 43 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ class Legislation::AnnotationsController < ApplicationController
has_orders %w{most_voted newest oldest}, only: :show
def index
@annotations = @draft_version.annotations
end
def show

View File

@@ -20,6 +20,8 @@ class Legislation::DraftVersionsController < Legislation::BaseController
if params[:redirect_action] == 'changes'
redirect_to legislation_process_draft_version_changes_path(@process, version)
elsif params[:redirect_action] == 'annotations'
redirect_to legislation_process_draft_version_annotations_path(@process, version)
else
redirect_to legislation_process_draft_version_path(@process, version)
end