On May 25, 12:35 pm, Alexander <info.stanko...@gmail.com> wrote: > I have a typical method in controller: > > def create > @user = User.new(params[:user]) > if @user.save > flash[:notice] = "Successfully created user." > redirect_to @user > else > render :action => 'new' > end > end > > I thought it automatically saves the attribute :role_ids
But that's not what your form (at least not in your initial post) is doing - it's setting the attribute :user_ids in params[:role] which you aren't using. Did you actually mean to create a checkbox user[role_ids][] for each role ? Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.