lib/activity_notification/apis/subscription_api.rb
# Validates subscribing_to_optional_target cannot be true when subscribing is false.
Validates subscribing_to_optional_target cannot be true when subscribing is false.
Validates subscribing_to_optional_target cannot be true when subscribing is false .
def subscribing_to_optional_target_cannot_be_true_when_subscribing_is_false
        optional_target_names.each do |optional_target_name|
          if !subscribing && subscribing_to_optional_target?(optional_target_name)
            errors.add(:optional_targets, "#Subscription.to_optional_target_key(optional_target_name) cannot be true when subscribing is false")
          end
        end
      end
def subscribing_to_optional_target_cannot_be_true_when_subscribing_is_false optional_target_names . each do | optional_target_name | if ! subscribing && subscribing_to_optional_target? ( optional_target_name ) errors . add ( :optional_targets , "#Subscription.to_optional_target_key(optional_target_name) cannot be true when subscribing is false" ) end end end
Validates subscribing_to_optional_target cannot be true when subscribing is false.
Validates subscribing_to_optional_target cannot be true when subscribing is false .