开发者

Rails - Validating date_select helper

I'm using date_select helper which passes params like:

date_of_birth(1i)
date_of_birth(2i)
date_of_birth(3i)

I would like to validate using validates_presence_of but returns the following error when blank is selected from the d开发者_开发问答ropdowns:

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.empty?


Looks like jQuery was the right solution for me. :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜