Module: JsonRecord::ActiveRecordStub::ClassMethods
- Defined in:
- lib/json_record/embedded_document.rb
Instance Method Summary collapse
- #human_attribute_name(attribute, options = {}) ⇒ Object
- #human_name(options = {}) ⇒ Object
- #self_and_descendants_from_active_record ⇒ Object
- #self_and_descendents_from_active_record ⇒ Object
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, = {}) attribute.to_s.humanize end |
#human_name(options = {}) ⇒ Object
11 12 13 |
# File 'lib/json_record/embedded_document.rb', line 11 def human_name ( = {}) name.split('::').last.humanize end |
#self_and_descendants_from_active_record ⇒ Object
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_record ⇒ Object
23 24 25 |
# File 'lib/json_record/embedded_document.rb', line 23 def self_and_descendents_from_active_record [self] end |