app/models/setting.rb
# check if settings for a particular adapter should be validated
check if settings for a particular adapter should be validated
check if settings for a particular adapter should be validated
def should_validate?(adapter)
    return true if default_outgoing_sms_adapter == adapter
    case adapter
    when "Twilio"
      twilio_phone_number.present? || twilio_account_sid.present? || twilio_auth_token1.present?
    when "FrontlineCloud"
      frontlinecloud_api_key.present?
    end
  end
def should_validate? ( adapter ) return true if default_outgoing_sms_adapter == adapter case adapter when "Twilio" twilio_phone_number . present? || twilio_account_sid . present? || twilio_auth_token1 . present? when "FrontlineCloud" frontlinecloud_api_key . present? end end
check if settings for a particular adapter should be validated
check if settings for a particular adapter should be validated
# settings for the default outgoing adapter should always be validated # settings for an adapter should be validated if any settings for that adapter are present
adapter
<not_specific>