I have seen quite a few topics about where it is best to place your own validation classes (ActiveModel :: EveryValidator extension), but cannot figure out which one is best suited. Some threads and tutorials say they put them in "lib /" and change "/config/application.rb", other threads say that if you just put them in "application / validators", they will be automatically included ... any ideas on this? What is the best practice for this?
The solution "libs /" has a drawback because you need to change "/config/application.rb", but as I understand it, including it in the "application / validators" will include it, although you need to add the directory to the application folder. It is right? Thanks!
source share