Module: Validateable::ClassMethods

Defined in:
lib/adaptation/validateable.rb

Instance Method Summary collapse

Instance Method Details

#human_attribute_name(attribute_key_name, options = {}) ⇒ Object



39
40
41
# File 'lib/adaptation/validateable.rb', line 39

def human_attribute_name(attribute_key_name, options = {})
  ""
end

#human_nameObject



35
36
37
# File 'lib/adaptation/validateable.rb', line 35

def human_name
  ""
end

#self_and_descendents_from_active_recordObject

Define class methods here.



24
25
26
27
28
29
30
31
32
33
# File 'lib/adaptation/validateable.rb', line 24

def self_and_descendents_from_active_record # :nodoc:
  klass = self
  classes = [klass]
  while klass != klass.base_class
    classes << klass = klass.superclass
  end
  classes
rescue
  [self]
end