Posted by Jason Green
Below is an example of how to produce a form for an embeds_many association for mongoid and simple_form (although this will also work with the standard rails helpers). Class User include Mongoid::Document embeds_many :children, :class_name => "Child" accepts_nested_attributes_for :children, reject_if: proc { |attributes| attributes["age"].blank? } end Class Children include Mongoid::Document field :age, type: String embedded_in [...]