OK, I've turned that into a method.  And it works now.  I thought it might 
have followed the *before_* situations that *Sinatra* follows.  

As well, is *Object.valid? *a alias for *Object.validate* as it's not 
apparent due to the *super*.  The individual validates_ methods were fine.  
It was suggested that I include this plugin after *helpers* and before 
*models*.  

Thank you.  

On Sunday, October 29, 2023 at 6:50:26 AM UTC-4 Marcelo wrote:

> I don't see the *validation_helpers* plugin adding a *before_validation* 
> class method:
>
> https://sequel.jeremyevans.net/rdoc-plugins/classes/Sequel/Plugins/ValidationHelpers.html
>
> You can see in the docs how this plugin only adds some *validates_** 
> methods, which should be called inside the model's *validate* method.
>
> This *before_validation* class method is something that exists in 
> Rails/ActiveRecord; I'm not sure it exists in Sequel.
>
> On Sunday, October 29, 2023 at 11:40:32 AM UTC+1 bee...@gmail.com wrote:
>
>> For some reason I can't get the validation_helpers to load:
>>
>>
>> In the models loader:
>> *Sequel::Model.plugin :validation_helpers*
>>
>> Models are loaded after helpers.  Inside the class that's been working:
>> *plugin :validation_helpers*
>>
>> Error:
>> *undefined method `before_validation' for Carrier:Class*
>>
>> It seems like everything is in order, however it isn't loading.  What 
>> should I be checking?
>>
>> Cheers
>>
>

-- 
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 sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/42ec4205-5cfa-4703-a893-42aac74f3e38n%40googlegroups.com.

Reply via email to