Changeset 6851
- Timestamp:
- 05/26/07 00:32:52 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r6830 r6851 1 1 *SVN* 2 3 * auto_complete_field takes a :method option so you can GET or POST. #8120 [zapnap] 2 4 3 5 * Added option to suppress :size when using :maxlength for FormTagHelper#text_field #3112 [rails@tpope.info] trunk/actionpack/lib/action_view/helpers/java_script_macros_helper.rb
r6350 r6851 140 140 # insertion should be extracted. If this is not specified, 141 141 # the entire element is used. 142 # <tt>:method</tt>:: Specifies the HTTP verb to use when the autocompletion 143 # request is made. Defaults to POST. 142 144 def auto_complete_field(field_id, options = {}) 143 145 function = "var #{field_id}_auto_completer = new Ajax.Autocompleter(" … … 153 155 js_options[:paramName] = "'#{options[:param_name]}'" if options[:param_name] 154 156 js_options[:frequency] = "#{options[:frequency]}" if options[:frequency] 157 js_options[:method] = "'#{options[:method].to_s}'" if options[:method] 155 158 156 159 { :after_update_element => :afterUpdateElement, trunk/actionpack/test/template/java_script_macros_helper_test.rb
r6729 r6851 41 41 assert_dom_equal %(<script type=\"text/javascript\">\n//<![CDATA[\nvar some_input_auto_completer = new Ajax.Autocompleter('some_input', 'some_input_auto_complete', 'http://www.example.com/autocomplete', {paramName:'huidriwusch'})\n//]]>\n</script>), 42 42 auto_complete_field("some_input", :url => { :action => "autocomplete" }, :param_name => 'huidriwusch'); 43 assert_dom_equal %(<script type=\"text/javascript\">\n//<![CDATA[\nvar some_input_auto_completer = new Ajax.Autocompleter('some_input', 'some_input_auto_complete', 'http://www.example.com/autocomplete', {method:'get'})\n//]]>\n</script>), 44 auto_complete_field("some_input", :url => { :action => "autocomplete" }, :method => :get); 43 45 end 44 46