I have the following models:
class User
include Mongoid::Document
has_one :gender
class Gender
include Mongoid::Document
has_and_belongs_to_many :users
Gender table is seeded with genders.
My simpleform for user edit is as follows:
<%= simple_form_for @user do |f| %>
<%= f.input :gender, :collection => Gender.all, :prompt => "Choose a gender" %>
<%= f.submit "Save" %>
<% end %>
However when I save this, a user.gender
doesn't do anything.
Anyone have any thoughts on this?