I have a HABTM association as followed:
class Account < ActiveRecord::Base
class User < ActiveRecord::Base
class Type < ActiveRecord::Base
I have the following query;
I Have a parent user who is creating another user under its account.
How can i add association record between the new user (that is getting
added) and the parent user’s account.
my form is as followed:
<%= f.text_field :username %>
<%= f.text_field :email %>
<%= f.password_field :password %>
<%= f.password_field :password_confirmation %>
<% for type in Type.find(:all) %>
<%= check_box_tag “user[type_ids]”, type.id,
<%= type.type_name %>
<% end %>
Thanks in advance for any guidelines.