lib/assets/javascripts/unpoly/form.js.coffee in unpoly-rails-0.25.0 vs lib/assets/javascripts/unpoly/form.js.coffee in unpoly-rails-0.25.1
- old
+ new
@@ -59,11 +59,11 @@
If the argument points to an element that is not a form,
Unpoly will search its ancestors for the closest form.
@param {String} [options.url]
The URL where to submit the form.
Defaults to the form's `action` attribute, or to the current URL of the browser window.
- @param {String} [options.method]
+ @param {String} [options.method='post']
The HTTP method used for the form submission.
Defaults to the form's `up-method`, `data-method` or `method` attribute, or to `'post'`
if none of these attributes are given.
@param {String} [options.target]
The selector to update when the form submission succeeds (server responds with status 200).
@@ -222,10 +222,10 @@
callback = null
if u.isGiven(options.change)
u.error('up.observe now takes the change callback as the last argument')
- rawCallback = u.option(u.presentAttr($element, 'op-observe'), callbackArg)
+ rawCallback = u.option(u.presentAttr($element, 'up-observe'), callbackArg)
if u.isString(rawCallback)
callback = (value, $field) -> eval(rawCallback)
else
callback = rawCallback or u.error('up.observe: No change callback given')