Sha256: 99f2279c5ea84f77a970d9e292ea600c24c3d9e2eb19344429dd52c42e087e0a

Contents?: true

Size: 408 Bytes

Versions: 55

Compression:

Stored size: 408 Bytes

Contents

# Validates Arm model.
class ArmValidator < ActiveModel::Validator
  def validate(record)
    if ActiveRecord::Base.connection
       .column_exists?(:arms, :can_message_after_membership_complete) &&
       record.can_message_after_membership_complete.nil?
      record.errors[:base] << "An Arm must have a value for can_message"\
                              "_after_membership_complete"
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
think_feel_do_engine-3.19.9 app/models/arm_validator.rb
think_feel_do_engine-3.19.8 app/models/arm_validator.rb
think_feel_do_engine-3.19.7 app/models/arm_validator.rb
think_feel_do_engine-3.19.6 app/models/arm_validator.rb
think_feel_do_engine-3.19.5 app/models/arm_validator.rb
think_feel_do_engine-3.19.4 app/models/arm_validator.rb
think_feel_do_engine-3.19.3 app/models/arm_validator.rb
think_feel_do_engine-3.19.2 app/models/arm_validator.rb
think_feel_do_engine-3.19.1 app/models/arm_validator.rb
think_feel_do_engine-3.19.0 app/models/arm_validator.rb
think_feel_do_engine-3.18.0 app/models/arm_validator.rb
think_feel_do_engine-3.17.2 app/models/arm_validator.rb
think_feel_do_engine-3.17.1 app/models/arm_validator.rb
think_feel_do_engine-3.17.0 app/models/arm_validator.rb
think_feel_do_engine-3.16.3 app/models/arm_validator.rb
think_feel_do_engine-3.16.2 app/models/arm_validator.rb
think_feel_do_engine-3.16.1 app/models/arm_validator.rb
think_feel_do_engine-3.15.7 app/models/arm_validator.rb
think_feel_do_engine-3.16.0 app/models/arm_validator.rb
think_feel_do_engine-3.15.6 app/models/arm_validator.rb