Where should Rails 3 custom validators be stored?

前端 未结 4 1540
无人共我
无人共我 2020-12-04 17:00

I\'ve seen docs/websites show that custom validators should go in a /lib or /lib/validators directory of a project. I\'ve found (by reading an answ

4条回答
  •  再見小時候
    2020-12-04 17:50

    Here's the official docs about custom validations. AFAIK its a good practice to keep them in the relevant models.

提交回复
热议问题