Thanks
On Apr 24, 2:31 am, Jeremy Evans <[email protected]> wrote:
> On Apr 23, 1:57 pm, Kane <[email protected]> wrote:
>
> > What if i need to do some extended checking, which of course require
> > direct acces to the db field, what should i do?
>
> You just add an error to the model's errors object if a check fails:
>
> def validate
> super
> errors.add(:column1, "is not less than column2") unless column1 <
> column2
> end
>
> Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-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/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---