Sha256: cf0fa064ac193d72b856ed4fea3222c562ee85b217a1cbd4bbb8393f33d63ef5

Contents?: true

Size: 956 Bytes

Versions: 3

Compression:

Stored size: 956 Bytes

Contents

module DataMapper
  module Validate
    module Fixtures
      class BetaTesterAccount
        #
        # Behaviors
        #

        include ::DataMapper::Resource

        #
        # Properties
        #

        property :id,             Serial
        property :full_name,      String, :auto_validation => false
        property :email,          String, :auto_validation => false

        property :user_agreement,    Boolean, :auto_validation => false
        property :newsletter_signup, String,  :auto_validation => false
        property :privacy_agreement, String,  :auto_validation => false

        #
        # Validations
        #

        validates_is_accepted :user_agreement, :allow_nil => false
        validates_is_accepted :newsletter_signup
        validates_is_accepted :privacy_agreement, :accept => %w(agreed accept), :message => "You must accept this agreement in order to proceed"
      end # BetaTesterAccount
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dm-validations-0.10.2 spec/fixtures/beta_tester_account.rb
dm-validations-0.10.1 spec/fixtures/beta_tester_account.rb
dm-validations-0.10.0 spec/fixtures/beta_tester_account.rb