Is there an :if option available with validations? I am trying to
reproduce the restful_authentication plugin to work with sequel and
using something like this.
attr_accessor :password
validates_presence_of :password, :if => :password_required?
protected
def password_required?
self.crypt
Ok, thanks. I'll give not_naughty a shot! Funny name :)
On May 26, 11:28 am, Jeremy Evans <[EMAIL PROTECTED]> wrote:
> On May 26, 8:20 am, dusty <[EMAIL PROTECTED]> wrote:
>
>
>
> > Is there an :if option available with validations? I am trying to
> > reproduce the restful_authentication plugi
On May 26, 8:20 am, dusty <[EMAIL PROTECTED]> wrote:
> Is there an :if option available with validations? I am trying to
> reproduce the restful_authentication plugin to work with sequel and
> using something like this.
>
> attr_accessor :password
> validates_presence_of :password, :if => :passwo