Formtastic with Mongoid embedded_in relations
- by miah
Is there any quick way to make a form for embeds_many-embedded_in relation?
I have the following:
class Team
include Mongoid::Document
field :name, :type => String
embeds_many :players
end
class Player
include Mongoid::Document
embedded_in :team, :inverse_of => :players
field :name, :type => String
end
I want to create a form for team with embedded editing for players. Seen https://github.com/bowsersenior/formtastic_with_mongoid_tutorial but "TODO" there.