Understanding Rails validation: what does allow_blank do?

后端 未结 6 1806
一个人的身影
一个人的身影 2020-12-09 01:15

I\'m quite new to Rails and found a little snippet to validate presence and uniqueness step by step: first check presence, then check uniqueness.

validates :         


        
6条回答
  •  南方客
    南方客 (楼主)
    2020-12-09 01:54

    Too much explain just make simple things more complicated, let's just say:

    # do not use this validates to check if the value is blank
    

提交回复
热议问题