I tried what you suggested, and now it's telling me that password is
too short minimum 1. I am putting in 4,5,6 characters. I also put in
this:

merge_validates_confirmation_of_password_field_options

What are the options, I don't see them in rdoc.

Thanks.

On Oct 27, 11:51 am, Philip Hallstrom <[email protected]> wrote:
> On Oct 27, 2009, at 8:28 AM, about2flip wrote:
>
>
>
>
>
> > Hi:
>
> > I read through the rdocs, and I saw the following:
>
> > def require_password_confirmation(value = nil)
> >  rw_config(:require_password_confirmation, value, true)
> > end
>
> > def validates_length_of_password_field_options(value = nil)
> >  rw_config(:validates_length_of_password_field_options, value,
> > {:minimum => 4, :if => :require_password?})
> > end
>
> > def validates_length_of_password_confirmation_field_options(value =
> > nil)
> >  rw_config(:validates_length_of_password_confirmation_field_options,
> > value, validates_length_of_password_field_options)
> > end
>
> > i put these into my ApplicationController, and it does not seem to be
> > working. It still tells me that mypasswordconfirmation istooshort.
> > I am pulling out my hair.
>
> These don't go in your ApplicationController... they go into the model  
> that you are applyingAuthLogicon.  The below would change the  
> minimum to 1 character.
>
> class User < ActiveRecord::Base
>    acts_as_authentic do |c|
>
> c
> .merge_validates_length_of_password_confirmation_field_options
>   :minimum => 1
>    end
> end
>
> Unless you have a good reason though requiring at least 4 characters  
> isn't unreasonable (some would argue you should require more).
>
> -philip
>
> > Any help would be greatly appreciated. Also, I am on XP OS.
>
> > Thanks Again
>
> > On Oct 27, 8:39 am, Marnen Laibow-Koser <rails-mailing-l...@andreas-
> > s.net> wrote:
> >> about2flip wrote:
> >>> Hi:
>
> >>> I am usingauthlogic, and following railscast tutorial. I am running
> >>> into this error code with thepasswordconfirmation.
>
> >>>authlogicpasswordconfirmation istooshort
>
> >>> Has anyone experienced this error? I need your help.
>
> >>> Thanks in advance for your help.
>
> >> ConfigureAuthlogicwith a different minimumpasswordlength (check  
> >> the
> >> rdoc for details).
>
> >> Best,
> >> --
> >> Marnen Laibow-Koserhttp://www.marnen.org
> >> [email protected]
> >> --
> >> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to