Sunday, November 28, 2010

a complete way to use button_to_remote on ruby on rails

button_to_remote "text",
    {:url => { :controller => :controller,
      :action     => :action,
      :attrs => attrs   }},
    {:class => "css_class"}

1 comment:

  1. button_to_remote is removed from Rails 3, use:
    button_to instead and add the parameter
    :remote => true
    i.e.
    <% button_to "text", :remote => true %>

    ReplyDelete