I have a regression between Rails 3.1 and 3.2 that appears to be introduced by pull request #2086.
I have a form with a date_select like this:
date_select 'bill', 'payment_month', discard_day: true, include_blank: true
In Rails 3.1 that worked fine as the multi-parameter conversion in ActiveRecord automatically added a 1 (one) for each missing parameter. However, Rails 3.2 (with pull request #2086) changed this behaviour to return nil if any of the multi-parameters were missing. That effectively means that it is no longer possible to use the above combination.
The date_select will provide a default day-value in a hidden field only if include_blank is false. A possible solution may be to change this behaviour to always add hidden fields with default values regardless of the include_blank parameter as it would simply be discarded now.
Could you try to add a falling test or open a pull request?
I am not entirely sure where I should add a failing unit test. It is the combination of date_select and the multi-parameter conversion that fails for me.
The easy fix for my case would be to change date_select to add a value to the hidden day parameter but that would change a behavior that has not changed in years.
Can you give me a hint on what you would like to see?
This issue is related with #4553. I'm taking a look in this
Fix date_select with discard_month and discard_year options
Closes #4553 and #4633