##sub model, position
class Position < ActiveRecord::Base
belongs_to :account
has_many :users
has_many :position_auto_enrollments
validates_uniqueness_of :name, :scope => :account_id
def name
self[:name].capitalize
end
end
##snippet from the view that contains multiple models, @user is the super model of the form that contains the submodel position
<tr>
<th><label for="position_name">Position</label></th>
<% fields_for "user[position]", @user.position do |position| %>
<td><%= position.text_field 'name' %> </td>
<% end %>
</tr>