How to create password and confirmation when using form_for?

I am using form_for, but I'm not sure how to create the password and password confirmation using the helpers?

I have so far:

<%= form_for :user, @user, ....   do |f| %>

<%= f.text_field :user_name, :class ....  %>

password??

<% end %>

Also, when posting to the /user/create action, how to do I prevent certain fields in the model from being initialized when using:

@user = User.new(params[:user])
8
задан Gonzalo 25 October 2010 в 03:21
поделиться