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

Version Path
hobo_rapid-2.2.6 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.2.5 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.2.4 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.2.3 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.2.2 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.2.1 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.2.0 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.1.2 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.1.1 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.1.0 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.1.0.pre4 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.1.0.pre3 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.1.0.pre2 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.1.0.pre1 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.0.1 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.0.0 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.0.0.pre10 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.0.0.pre9 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.0.0.pre8 taglibs/buttons/remote_method_button.dryml
hobo_rapid-2.0.0.pre7 taglibs/buttons/remote_method_button.dryml