validate uniqueness not working as expected in rails -


i have simple form on view. i'm wanting compare whats inside database against whats put database.

here have in controller

validate_uniqueness_of :link1, :link2, :link3, :link4 

however when try , run create, error

undefined method `validate_uniqueness_of' 

any ideas why isn't working?

i have tried validates: , didn't work either

validates_uniqueness_of activemodel::validations::classmethods method, should move validation controller model.


Comments