Changeset 4375
- Timestamp:
- 05/29/06 00:05:13 (4 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_view/helpers/javascripts/prototype.js (modified) (1 diff)
- trunk/actionpack/lib/action_view/helpers/prototype_helper.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r4374 r4375 1 1 *SVN* 2 2 3 * Added :method handling for other verbs to remote_form_tag and remote_form_for [DHH] 4 5 * Expanded :method option in FormHelper#form_tag to allow for verbs other than GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post [DHH] 3 * Expanded :method option in FormTagHelper#form_tag, FormHelper#form_for, PrototypeHelper#remote_form_for, PrototypeHelper#remote_form_tag, and PrototypeHelper#link_to_remote to allow for verbs other than GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post [DHH] 6 4 7 5 * Added :method option to UrlHelper#link_to, which allows for using other verbs than GET for the link. This replaces the :post option, which is now deprecated. Example: link_to "Destroy", person_url(:id => person), :method => :delete [DHH] trunk/actionpack/lib/action_view/helpers/javascripts/prototype.js
r4182 r4375 670 670 if (parameters.length > 0) parameters += '&_='; 671 671 672 /* Simulate other verbs over post */ 673 if (this.options.method != 'get' && this.options.method != 'post') { 674 parameters += (parameters.length > 0 ? '&' : '') + '_method=' + this.options.method 675 this.options.method = 'post' 676 } 677 672 678 try { 673 679 this.url = url; trunk/actionpack/lib/action_view/helpers/prototype_helper.rb
r4374 r4375 40 40 # DOM object whose id can be specified with <tt>options[:update]</tt>. 41 41 # Usually, the result would be a partial prepared by the controller with 42 # either render_partial or render_partial_collection.42 # render :partial. 43 43 # 44 44 # Examples: … … 60 60 # influence how the target DOM element is updated. It must be one of 61 61 # <tt>:before</tt>, <tt>:top</tt>, <tt>:bottom</tt>, or <tt>:after</tt>. 62 # 63 # The method used is by default POST. You can also specify GET or you 64 # can simulate PUT or DELETE over POST. All specified with <tt>options[:method]</tt> 65 # 66 # Example: 67 # link_to_remote "Destroy", person_url(:id => person), :method => :delete 62 68 # 63 69 # By default, these remote requests are processed asynchronous during