开发者

Rails for Zombies Level 2 Challenge 4

开发者 https://www.devze.com 2023-02-28 20:42 出处:网络
I\'m not sure how to solve this. I tried rewatching the videos but it doesn\'t say how to link \"presence\" and \"uniqueness\" validations to zombie\'s name.

I'm not sure how to solve this. I tried rewatching the videos but it doesn't say how to link "presence" and "uniqueness" validations to zombie's name. Any suggestions?

Picture here: http://i.stack.imgur.com/2nAEs.pn开发者_StackOverflow社区g

Thanks


Simple as

validates :name, :presence => true, :uniqueness => true


it is giving this error on typing above code ArgumentError: You need to supply at least one validation

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号