Support for form helper options :as, :namespace #272

merged 2 commits into from Feb 9, 2012


None yet
2 participants

carlosramireziii commented Feb 9, 2012

In Rails 3.2 the way in which form IDs were generated when using the :as option was changed (e29773f885)

The :namespace form option was also introduced in 3.2 (ad5c8b0d52)

Both of these changes were causing the client_side_validations settings object to be undefined because the form ID was different than the name that the gem was giving to the DOM window attribute which stored the settings.

I attempted to maintain backwards compatibility with Rails 3.1 to adhere to your "support two minor versions" rule. Tests are included.

Thank you!


bcardarella commented Feb 9, 2012

Thank-you. I'm not a fan of the conditional tests but I don't think there is any way around it. Nice pull request.

@bcardarella bcardarella added a commit that referenced this pull request Feb 9, 2012

@bcardarella bcardarella Merge pull request #272 from carlosramireziii/master
Support for form helper options :as, :namespace

@bcardarella bcardarella merged commit bf59324 into DavyJonesLocker:master Feb 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment