Browse Source

Remove housingneeds_present? method

pull/826/head
Kat 3 years ago committed by Kat
parent
commit
d9c61a1dde
  1. 6
      app/models/case_log.rb

6
app/models/case_log.rb

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

Loading…
Cancel
Save