Class: MongoMapper::Plugins::Associations::EmbeddedCollection

Inherits:
Object
  • Object
show all
Defined in:
lib/mm_partial_update/extensions.rb

Instance Method Summary collapse

Instance Method Details

#can_be_persistable?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/mm_partial_update/extensions.rb', line 26

def can_be_persistable?
  true
end

#make_persistableObject



33
34
35
36
# File 'lib/mm_partial_update/extensions.rb', line 33

def make_persistable
  class << self; include MmPartialUpdate::EmbeddedCollection; end unless persistable?
  @persistable = true
end

#persistable?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/mm_partial_update/extensions.rb', line 29

def persistable?
  @persistable
end