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. :)
精彩评论