i have a question about how validates_presence_of works as it pertains
to a login system. when you create a user for the first time you can
require that both their password and confirmation password are present.
but on subsequent updates to the that record you have to enter a
confirmation password and that’s really annoying.
i’ve been looking around and i’ve seen solutions that like something
like tihs:
message - A custom error message (default is: “can.t be blank”)
on - Specifies when this validation is active (default is :save,
other options :create, :update)
if - Specifies a method, proc or string to call to determine if the
validation should occur (e.g. :if => :allow_validation, or :if =>
Proc.new { |user| user.signup_step > 2 }). The method, proc or string
should return or evaluate to a true or false value.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.