Module: ActiveModel::Validations

Defined in:
lib/validation_hints.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#has_validations?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/validation_hints.rb', line 22

def has_validations?
  self.class.has_validations?
end

#has_validations_for?(attribute) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/validation_hints.rb', line 26

def has_validations_for?(attribute)
  self.class.has_validations_for?(attribute)
end

#hintsObject



30
31
32
# File 'lib/validation_hints.rb', line 30

def hints
  @hints ||= Hints.new(self)
end