Browse Source

Extract a method

pull/2203/head
Kat 2 years ago
parent
commit
77cf876011
  1. 2
      app/models/form/sales/pages/buyer_previous.rb
  2. 4
      app/models/sales_log.rb

2
app/models/form/sales/pages/buyer_previous.rb

@ -12,7 +12,7 @@ class Form::Sales::Pages::BuyerPrevious < ::Form::Page
end
def routed_to?(log, _current_user)
return false if log.staircase == 1 && log.form.start_year_after_2024?
return false if log.is_staircase? && log.form.start_year_after_2024?
super
end

4
app/models/sales_log.rb

@ -477,4 +477,8 @@ class SalesLog < Log
def nationality2_uk_or_prefers_not_to_say?
nationality_all_buyer2_group&.zero? || nationality_all_buyer2_group == 826
end
def is_staircase?
staircase == 1
end
end

Loading…
Cancel
Save