How to generate password automatically using authlogic..

I have problem , i want to generate password automatically where can i manipulate :password and :confirm_password in action create

  def create     @user = User.new(params[:user])      if @user.save       flash[:notice] = "Registration successful."       redirect_to root_url     else       render :action => 'new'     end   end

Have you tried just setting @user.password and @user.password_confirmation (or equivalent) before the @user.save part?

--Matt Jones

Matt Jones wrote:

Have you tried just setting @user.password and @user.password_confirmation (or equivalent) before the @user.save part?

--Matt Jones

On Sep 23, 10:33�pm, "Thriving K." <rails-mailing-l...@andreas-s.net>

Thank you, i can fix it now. i have to put

= f.hidden_field :password,:value=>"" = f.hidden_field :password_confirmation,:value=>""

in form first and then i can type

@user.password=@user.password_confirmation=random_password in controller before save