Ruby on Rails: How to validate a model without Active Record?

前端 未结 2 610
情话喂你
情话喂你 2021-01-03 21:09

I\'m currently trying to validate fields without having an ActiveRecord::Base inheritance.

My model stores the data on a cache server so I do not need A

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-03 21:39

    Check out our Veto gem instead if you're looking for a standalone validations for ruby objects. It's lightweight, and has no dependencies.. ActiveModel might be overkill.

提交回复
热议问题