app/concepts/offer/contracts.rb
# Location is only allowed when encounter is personal, but if it is, it
# HAS to be present. A remote offer needs an area.
Location is only allowed when encounter is personal, but if it is, it
HAS to be present. A remote offer needs an area.
Location is only allowed when encounter is personal but if it is it HAS to be present . A remote offer needs an area .
def location_and_area_fit_encounter
      if personal? && !location
        custom_error :location, 'needs_location_when_personal'
      elsif !personal?
        if location
          custom_error :location, 'refuses_location_when_remote'
        end
        unless area
          custom_error :area, 'needs_area_when_remote'
        end
      end
    end
def location_and_area_fit_encounter if personal? && ! location custom_error :location , 'needs_location_when_personal' elsif ! personal? if location custom_error :location , 'refuses_location_when_remote' end unless area custom_error :area , 'needs_area_when_remote' end end end
Location is only allowed when encounter is personal, but if it is, it
HAS to be present.
Location is only allowed when encounter is personal but if it is it HAS to be present .