diff --git a/app/controllers/providers/change_of_names_controller.rb b/app/controllers/providers/change_of_names_controller.rb index 17cddbee3b..d4912973a4 100644 --- a/app/controllers/providers/change_of_names_controller.rb +++ b/app/controllers/providers/change_of_names_controller.rb @@ -1,14 +1,14 @@ module Providers class ChangeOfNamesController < ProviderBaseController def show - @proceeding = legal_aid_application.proceedings.last + @proceeding = legal_aid_application.proceedings.order(:created_at).last form end def update return continue_or_draft if draft_selected? - @proceeding = legal_aid_application.proceedings.last + @proceeding = legal_aid_application.proceedings.order(:created_at).last if form.valid? return redirect_to providers_legal_aid_application_change_of_names_interrupt_path(legal_aid_application) if form.change_of_name? diff --git a/app/controllers/providers/proceedings_sca/child_subjects_controller.rb b/app/controllers/providers/proceedings_sca/child_subjects_controller.rb index a75a63560c..7e965d7c40 100644 --- a/app/controllers/providers/proceedings_sca/child_subjects_controller.rb +++ b/app/controllers/providers/proceedings_sca/child_subjects_controller.rb @@ -4,14 +4,14 @@ class ChildSubjectsController < ProviderBaseController prefix_step_with :proceedings_sca def show - @proceeding = legal_aid_application.proceedings.last + @proceeding = legal_aid_application.proceedings.order(:created_at).last form end def update return continue_or_draft if draft_selected? - @proceeding = legal_aid_application.proceedings.last + @proceeding = legal_aid_application.proceedings.order(:created_at).last if form.valid? return redirect_to providers_legal_aid_application_sca_interrupt_path(legal_aid_application, "child_subject") unless form.child_subject?