Sha256: 252dd05f1f3624254019d473e641e9c0850545e6866788eb48d09e272062c2a9
Contents?: true
Size: 1.13 KB
Versions: 26
Compression:
Stored size: 1.13 KB
Contents
<!-- DEPRECATED. remote-method-button is provided for backwards compatibility. Ajax functionality is no longer supported. This would be easy to fix, but testing is harder, so if you want to volunteer to test it, we can fix it for you. You can replace remote-method-button with something like: <form action="method" method="POST"><submit/></form> ### Attributes Either method or url must be specified. - method: the name of the web-method to call - label: the label on the button - url: use this url instead of looking it up --> <def tag="remote-method-button" attrs="method, label, url"><%= ajax_attributes, html_attributes = attributes.partition_hash(HoboRapidHelper::AJAX_ATTRS) url ||= object_url(this, method.to_s.gsub('-', '_'), :method => :post) raise ArgumentError, "no such web method '#{method}' on #{this.typed_id}" unless url add_classes!(html_attributes, "button remote-method-button #{method}-button") label ||= method.titleize if !ajax_attributes.empty? ajax_attributes[:message] ||= label fail "UNSUPPORTED" else button_to(label, url, html_attributes.merge(:confirm => confirm)) end %></def>
Version data entries
26 entries across 26 versions & 1 rubygems