Rails, making certain multiparameter attributes optional?
- by Joseph Silvashy
Is there a method already part of Rails for making certain parameters option when part of a multiparameter attribute, for example say I'm prompting a user for their birthday, when saved the has may look like this:
"birthday(2i)"=>"8",
"birthday(3i)"=>"17",
"birthday(1i)"=>"1980"}, ...
But the issue arises when say I want to allow the user to just provide their month and day, making the year optional, how would this work being a datetime object, I'm assuming you can't do this as a date object... but any ideas would be helpful.
Happy new year.