Class/Module Index [+]

Quicksearch

DataMapper::Validations::ClassMethods

Public Instance Methods

create(attributes = {}, *args) click to toggle source

@api public

# File lib/dm-validations.rb, line 128
def create(attributes = {}, *args)
  resource = new(attributes)
  resource.save(*args)
  resource
end
inherited(base) click to toggle source

@api private

# File lib/dm-validations.rb, line 117
def inherited(base)
  super
  self.validators.contexts.each do |context, validators|
    validators.each do |v|
      options = v.options.merge(:context => context)
      base.validators.add(v.class, v.field_name, options)
    end
  end
end
validators() click to toggle source

Return the set of contextual validators or create a new one

@api public

# File lib/dm-validations.rb, line 112
def validators
  @validators ||= ContextualValidators.new(self)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.