diff --git a/app/controllers/legislation/processes_controller.rb b/app/controllers/legislation/processes_controller.rb index 6593821cb..002b5ea65 100644 --- a/app/controllers/legislation/processes_controller.rb +++ b/app/controllers/legislation/processes_controller.rb @@ -20,6 +20,7 @@ class Legislation::ProcessesController < Legislation::BaseController end def debate + set_process @phase = :debate_phase if @process.debate_phase.started? @@ -30,6 +31,7 @@ class Legislation::ProcessesController < Legislation::BaseController end def draft_publication + set_process @phase = :draft_publication if @process.draft_publication.started? @@ -46,6 +48,7 @@ class Legislation::ProcessesController < Legislation::BaseController end def allegations + set_process @phase = :allegations_phase if @process.allegations_phase.started? @@ -62,6 +65,7 @@ class Legislation::ProcessesController < Legislation::BaseController end def result_publication + set_process @phase = :result_publication if @process.result_publication.started? @@ -77,5 +81,9 @@ class Legislation::ProcessesController < Legislation::BaseController end end + private + def set_process + @process = ::Legislation::Process.find(params[:process_id]) + end end