# How to generate password automatically using authlogic

**URL:** <https://www.ruby-forum.com/t/how-to-generate-password-automatically-using-authlogic/175980>\
**Category:** Deployment\
**Created:** [September 23, 2009, 10:13am UTC](https://www.ruby-forum.com/t/how-to-generate-password-automatically-using-authlogic/175980 "2009-09-23T10:13:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thriving](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@thriving](https://www.ruby-forum.com/u/thriving)\
**Post date:** [September 23, 2009, 10:13am UTC](https://www.ruby-forum.com/t/how-to-generate-password-automatically-using-authlogic/175980/1 "2009-09-23T10:13:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![thriving](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@thriving](https://www.ruby-forum.com/u/thriving)\
**Post date:** [September 24, 2009, 4:32am UTC](https://www.ruby-forum.com/t/how-to-generate-password-automatically-using-authlogic/175980/2 "2009-09-24T04:32:14Z")

</div>

Sorry, i have posted on the wrong group.
