Module: JsonRecord::ActiveRecordStub::ClassMethods

Defined in:
lib/json_record/embedded_document.rb

Instance Method Summary collapse

Instance Method Details

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



15
16
17
# File 'lib/json_record/embedded_document.rb', line 15

def human_attribute_name (attribute, options = {})
  attribute.to_s.humanize
end

#human_name(options = {}) ⇒ Object



11
12
13
# File 'lib/json_record/embedded_document.rb', line 11

def human_name (options = {})
  name.split('::').last.humanize
end

#self_and_descendants_from_active_recordObject



19
20
21
# File 'lib/json_record/embedded_document.rb', line 19

def self_and_descendants_from_active_record
  [self]
end

#self_and_descendents_from_active_recordObject



23
24
25
# File 'lib/json_record/embedded_document.rb', line 23

def self_and_descendents_from_active_record
  [self]
end