Module: Mongoid::Relations::Touchable::ClassMethods

Defined in:
lib/patches/embedded_touch.rb

Instance Method Summary collapse

Instance Method Details

#touchable(metadata) ⇒ Object



39
40
41
42
43
44
45
46
47
48
# File 'lib/patches/embedded_touch.rb', line 39

def touchable()
  if .touchable?
    name = .name
    method_name = define_relation_touch_method(name)
    after_save method_name
    after_destroy method_name
    after_touch method_name
  end
  self
end