diff --git a/app/interactors/transition_authorization_request_to_stage_of_authorization.rb b/app/interactors/transition_authorization_request_to_stage_of_authorization.rb index 1dd540905..ef935e2f2 100644 --- a/app/interactors/transition_authorization_request_to_stage_of_authorization.rb +++ b/app/interactors/transition_authorization_request_to_stage_of_authorization.rb @@ -1,6 +1,6 @@ class TransitionAuthorizationRequestToStageOfAuthorization < ApplicationInteractor def call - context.fail! unless context.authorization.can_reopen? + context.fail! unless context.authorization.reopenable? return if context.authorization_request.is_a? context.authorization.authorization_request_class.constantize diff --git a/app/models/authorization.rb b/app/models/authorization.rb index 14015bcd0..d5f7ee8c0 100644 --- a/app/models/authorization.rb +++ b/app/models/authorization.rb @@ -58,7 +58,7 @@ def request_as_validated end # rubocop:enable Metrics/AbcSize - def can_reopen? + def reopenable? latest? end @@ -82,7 +82,7 @@ def definition authorization_request_class.constantize.definition end - def can_reopen_to_another_stage? + def reopenable_to_another_stage? authorization_request.latest_authorizations_of_each_stage.count > 1 end diff --git a/app/views/reopen_authorizations/new.html.erb b/app/views/reopen_authorizations/new.html.erb index c61689966..15f0aedb2 100644 --- a/app/views/reopen_authorizations/new.html.erb +++ b/app/views/reopen_authorizations/new.html.erb @@ -15,8 +15,8 @@ <%= t('.invalid_request') %>

<% end %> - - <% if @authorization.can_reopen_to_another_stage? %> + + <% if @authorization.reopenable_to_another_stage? %>

<%= t('.warning_for_stages.title') %>

<%= t('.warning_for_stages.content').html_safe %> @@ -25,7 +25,7 @@