Module: Mongoid::Extensions::Array::ClassMethods
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
| Extended In: | |
| Defined in: | lib/mongoid/extensions/array.rb | 
Instance Attribute Summary
- 
    
      #resizable?  ⇒ true 
    
    readonly
    Returns whether the object’s size can be changed. 
Instance Method Summary
- #__mongoize_fk__(association, object) ⇒ Array deprecated Deprecated.
- 
    
      #mongoize(object)  ⇒ Array | nil 
    
    Turn the object from the ruby type we deal with to a Mongo friendly type. 
Instance Attribute Details
    #resizable?  ⇒ true  (readonly)
  
Returns whether the object’s size can be changed.
# File 'lib/mongoid/extensions/array.rb', line 150
def resizable? true end
Instance Method Details
#__mongoize_fk__(association, object) ⇒ Array
Deprecated. 
Convert the provided object to a proper array of foreign keys.
# File 'lib/mongoid/extensions/array.rb', line 118
def __mongoize_fk__(association, object) if object.resizable? object.blank? ? object : association.convert_to_foreign_key(object) else object.blank? ? [] : association.convert_to_foreign_key(Array(object)) end end
    #mongoize(object)  ⇒ Array | nil 
  
Turn the object from the ruby type we deal with to a Mongo friendly type.