diff --git a/hobo_rapid/taglibs/buttons/remote_method_button.dryml b/hobo_rapid/taglibs/buttons/remote_method_button.dryml index cdcb99ccc..4c79bbf92 100644 --- a/hobo_rapid/taglibs/buttons/remote_method_button.dryml +++ b/hobo_rapid/taglibs/buttons/remote_method_button.dryml @@ -1,21 +1,21 @@ - -<%= +<%= ajax_attributes, html_attributes = attributes.partition_hash(HoboRapidHelper::AJAX_ATTRS) url ||= object_url(this, method.to_s.gsub('-', '_'), :method => :post) @@ -23,11 +23,9 @@ Forms). If any ajax attributes are given, the button becomes an ajax button, if add_classes!(html_attributes, "button remote-method-button #{method}-button") label ||= method.titleize - if update || !ajax_attributes.empty? + if !ajax_attributes.empty? ajax_attributes[:message] ||= label - func = ajax_updater(url, update, ajax_attributes.merge(:confirm => confirm)) - html_attributes.update(:onclick => "var e = this; " + func, :type =>'button', :value => label) - element(:input, html_attributes, nil, true, true) + fail "UNSUPPORTED" else button_to(label, url, html_attributes.merge(:confirm => confirm)) end