[Rails] Extra Fields?

Russ Smith russ at igeanetwork.com
Thu Nov 11 20:44:03 GMT 2004


I knew it had to be something simple like that. :-)
Thanks


On Nov 11, 2004, at 12:40 PM, Tobias Luetke wrote:

> I added extra fields called password_confirmation and
> email_confirmation to my signup form and added this to the controller
> :
>
>     @newuser.errors.add("password", "does not match")   unless
> @newuser.password == @params['password_confirmation']
>     @newuser.errors.add("email", "does not match")      unless
> @newuser.email == @params['email_confirmation']
>
>
>
> On Thu, 11 Nov 2004 12:35:34 -0800, Russ Smith <russ at igeanetwork.com> 
> wrote:
>> I'm wondering how you would go about putting a "confirm password" 
>> field
>> into a form and not have it inserted into the database. An example
>> would be on the Basecamp sign up form. And also on that page is an
>> "accept terms" checkbox. I guess I want to know how do you run these
>> fields through validation (model or controller) and not have them
>> automatically entered into the database.
>>
>> Russ
>>
>> _______________________________________________
>> Rails mailing list
>> Rails at lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>
>
> -- 
> Tobi
> http://blog.leetsoft.com
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>



More information about the Rails mailing list