Module: Mongoid::Relations::Macros::ClassMethods
- Defined in:
- lib/patches/embedded_touch.rb
Instance Method Summary collapse
Instance Method Details
#embedded_in(name, options = {}, &block) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/patches/embedded_touch.rb', line 21 def (name, = {}, &block) if ancestors.include?(Mongoid::Versioning) raise Errors::VersioningNotOnRoot.new(self) end = characterize(name, Embedded::In, , &block) self. = true relate(name, ) builder(name, ).creator(name, ) touchable() add_counter_cache_callbacks() if .counter_cached? end |