Methods

Class/Module Index [+]

Quicksearch

Mongoid::Relations::Touchable::ClassMethods

Public Instance Methods

touchable(metadata) click to toggle source

Add the metadata to the touchable relations if the touch option was provided.

@example Add the touchable.

Model.touchable(meta)

@param [ Metadata ] metadata The relation metadata.

@return [ Class ] The model class.

@since 3.0.0

# File lib/mongoid/relations/touchable.rb, line 24
def touchable(metadata)
  self.touchables.push(metadata.name) if metadata.touchable?
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.