Re: validation_helpers

2023-10-29 Thread Jeremy Evans
On Sun, Oct 29, 2023 at 3:40 AM 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: > *pl

Re: validation_helpers

2023-10-29 Thread Michael Granger
On 29 Oct 2023, at 11:50, 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_

Re: validation_helpers

2023-10-29 Thread bee...@gmail.com
. 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/

Re: validation_helpers

2023-10-29 Thread Marcelo
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

validation_helpers

2023-10-29 Thread bee...@gmail.com
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

Alternative validation_helpers syntax feedback

2009-10-20 Thread Jeremy Evans
I've got a working implementation for a plugin that allows an alternative syntax for the validation_helpers plugin's methods (http:// pastie.org/662251.txt): def validate validates do name do presence max_length 10 end date do format %r{\d\d/\d\d/\d\d\d\d} end