|
|
|
@ -25,7 +25,7 @@ class CaseLog < ApplicationRecord
|
|
|
|
|
before_validation :reset_scheme_location!, if: :scheme_changed?, unless: :location_changed? |
|
|
|
|
before_validation :process_postcode_changes!, if: :postcode_full_changed? |
|
|
|
|
before_validation :process_previous_postcode_changes!, if: :ppostcode_full_changed? |
|
|
|
|
before_validation :set_housingneeds_fields, if: :housingneeds_present? |
|
|
|
|
before_validation :set_housingneeds_fields, if: :housingneeds? |
|
|
|
|
before_validation :reset_invalidated_dependent_fields! |
|
|
|
|
before_validation :reset_location_fields!, unless: :postcode_known? |
|
|
|
|
before_validation :reset_previous_location_fields!, unless: :previous_postcode_known? |
|
|
|
@ -732,10 +732,6 @@ private
|
|
|
|
|
string.present? ? string.upcase.gsub(/\s+/, "") : string |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def housingneeds_present? |
|
|
|
|
housingneeds.present? |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def fully_wheelchair_accessible? |
|
|
|
|
housingneeds_type.present? && housingneeds_type.zero? |
|
|
|
|
end |
|
|
|
|