MongoMapper plugin for nested attributes(accepts_nested_attributes_for)
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
README.md
mm-nested-attrs.gemspec

README.md


MongoMapper extension for accepts_nested_attributes


Installation:

gem install mm-nested-attrs

Using:

In your parent class:

class Parent
  include MongoMapper::Document
  plugin MongoMapper::Plugins::Associations::NestedAttributes
  accepts_nested_attributes_for :images, :allow_destroy => true, :reject_if => lambda { |t| t['img'].blank? }
end

In Gemfile

 gem 'mm-nested-attrs'