alphagov/hmrc-contacts — pull request #142 by tekin (2014-06-30 16:20:51+00:00)
Title: Remove hokey JS on update action

The app was using remote (JS) form-submission to update the "more info" attribute on the main Contact model from the various tabs. The only reason I can think that it was doing this was to keep the user on the current tab (whereas doing a standard Rails non-AJAX update would generally have redirected the user back to the main contact tab). This replaces the remote form submission, using a hidden parameter in the form to identify the tab the user was on and thus where they should be sent after a successful update.

This does mean that the user will be shown the contacts#edit page if there are validation errors, but given that there are no validations on any of the "more info" attributes, this should never happen.

This will resolve an exception that is currently being raised due to the removal of `decent_exposure` gem: https://errbit.production.alphagov.co.uk/apps/5333f0520da1156aab03efc2/problems/53b1718e0da1157ee0001440