lib/assets/javascripts/unpoly/form.js.coffee in unpoly-rails-0.26.0 vs lib/assets/javascripts/unpoly/form.js.coffee in unpoly-rails-0.26.1

- old
+ new

@@ -74,11 +74,11 @@ selector that matches the form itself. @param {Boolean|String} [options.history=true] Successful form submissions will add a history entry and change the browser's location bar if the form either uses the `GET` method or the response redirected to another page (this requires the `unpoly-rails` gem). - If want to prevent history changes in any case, set this to `false`. + If you want to prevent history changes in any case, set this to `false`. If you pass a `String`, it is used as the URL for the browser history. @param {String} [options.transition='none'] The transition to use when a successful form submission updates the `options.target` selector. Defaults to the form's `up-transition` attribute, or to `'none'`. @param {String} [options.failTransition='none'] @@ -541,10 +541,16 @@ @param {String} [up-transition] The animation to use when the form is replaced after a successful submission. @param {String} [up-fail-transition] The animation to use when the form is replaced after a failed submission. @param [up-history] - Set this to `'false'` to prevent the current URL from being updated. + Whether to push a browser history entry after a successful form submission. + + By default the form's target URL is used. If the form redirects to another URL, + the redirect target will be used. + + Set this to `'false'` to prevent the URL bar from being updated. + Set this to a URL string to update the history with the given URL. @param {String} [up-method] The HTTP method to be used to submit the form (`get`, `post`, `put`, `delete`, `patch`). Alternately you can use an attribute `data-method` ([Rails UJS](https://github.com/rails/jquery-ujs/wiki/Unobtrusive-scripting-support-for-jQuery)) or `method` (vanilla HTML) for the same purpose.