Skip to content

Commit

Permalink
default to post
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronchi committed Dec 2, 2008
1 parent fa9c393 commit d367aac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jrails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def options_for_ajax(options)
js_options['data'] = options[:with].gsub("Form.serialize(this.form)","#{JQUERY_VAR}.param(#{JQUERY_VAR}(this.form).serializeArray())")
end

js_options['type'] ||= "'post'"
if options[:method]
if method_option_to_s(options[:method]) == "'put'" || method_option_to_s(options[:method]) == "'delete'"
js_options['type'] = "'post'"
Expand Down Expand Up @@ -359,7 +360,6 @@ def sortable_element_js(element_id, options = {}) #:nodoc:
options.delete(:ghosting)

if options[:onUpdate] || options[:url]
options[:method] ||= "post"
options[:with] ||= "#{JQUERY_VAR}(this).sortable('serialize',{key:'#{element_id}'})"
options[:onUpdate] ||= "function(){" + remote_function(options) + "}"
end
Expand Down

0 comments on commit d367aac

Please sign in to comment.