Hobo Cookbook

View Source

Rapid

<remote-method-button>

Provides either an ajax or non-ajax button to invoke a “remote method” or “web method” declared in the controller. Web Methods provide support for the RPC model of client-server interaction, in contrast to the REST model. The preference in Rails is to use REST as much as possible, but we are pragmatists, and sometimes you just to need a remote procedure call.

The URL that the call is POSTed to is the object_url of this, plus the method name

<remote-method-button> supports all of the standard ajax attributes (see the main taglib documention for Rapid Forms). If any ajax attributes are given, the button becomes an ajax button, if not, Rails’ button_to is used, which behaves similarly to a standard link.

Attributes

  • method: the name of the web-method to call

  • label: the label on the button

Show Source

Comments

No comments to display