mongo_mapper-accepts_nested_attributes

Adds a accepts_nested_attributes_for class method to make mongo_mapper models work with nested forms.

Add gem to Gemfile:

gem "mongo_mapper-accepts_nested_attributes", :require => "mongo_mapper/accepts_nested_attributes"

To use include in your model:

plugin MongoMapper::AcceptsNestedAttributes

Now you can use:

accepts_nested_attributes_for :posts
accepts_nested_attributes_for :user

Or to add it globally, create an initialization file with:

MongoMapper::Document.plugin(MongoMapper::AcceptsNestedAttributes)
MongoMapper::EmbeddedDocument.plugin(MongoMapper::AcceptsNestedAttributes)

DELETE feature has not been added yet. This is a VERY basic plugin to simulate the feature. Hopefully, mongo_mapper will have support built in.

Contributing to mongo_mapper-accepts_nested_attributes

Copyright © 2011 Mooktakim Ahmed. See LICENSE.txt for further details.