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 my password confirmation is too short.
I am pulling out my hair.
Any help would be greatly appreciated. Also, I am on XP OS.
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 my password confirmation is too short.
I am pulling out my hair.
These don't go in your ApplicationController... they go into the model
that you are applying AuthLogic on. 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).
Sorry I got things the wrong way round - attr_accessible means that
User.new(params[:user]) will assign them, however when you use
attr_accessible any attribute you don't name is implicitly made
attr_protected (which is the thing where they aren't mass assigned).