views:

169

answers:

1

Is this possible given the button_to_remote function seems to be defined as a Prototype helper? I've replaced my /public/javascripts/rails.js with the jQuery driver.

When I try to use button_to_remote I get the error undefined method 'button_to_remote' for #<#<Class:0x000001078d7090>:0x0000010789ad20>

If this is not possible using button_to_remote, how can I accomplish the same thing using jQuery + Rails 3.

Thanks, Mark

A: 

Try this:

<%= button_to "Do Something", {:controller => :somecontroller, :action=> :something}, {:remote=>true} %>
Rob
Thanks. How do you specify the controller that responds to the action?
Mark Richman
Snippet updated...
Rob