A quick example using irb:

irb(main):002:0> o = Order.last
irb(main):003:0> o.valid?
=> true
irb(main):004:0> o.errors.add(nil, 'Test')
=> ["Test"]
irb(main):005:0> o.valid?
=> true
irb(main):006:0>


On Friday, June 5, 2015 at 3:46:54 PM UTC-6, James wrote:
>
> This is sort of a feature request I guess, and something that's caused me 
> to bang my head a few times now.  Currently you can access #errors and 
> #errors.add methods on a model, but they're not of any use (that I'm aware 
> of).  Any errors added using errors.add() prior to calling valid? will be 
> discarded when you call valid?.  It would be much more intuitive to be able 
> to add errors to a model prior to calling valid?, and have them cause 
> valid? to return false.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to