# template: 
#


#<%= collection_select(:user, :mentor_of, @subjects, :id, :title, { :selected => @user.mentor_of }, { :multiple => "true" }) %> #

# controller action def edit_user @user = User.find(params[:id]) @subjects = Subject.find(:all) end # user and subject relationship through enrollments has_many :mentor_of, :through => :enrollments, :source => :subject,:conditions => ["enrollment_type = ?","mentor"]