how to prevent URL change


FYI, you will need to use redirect_to in conjunction with AJAX to
ensure that you are backwards compatible with non-javascript enabled

So, for example:

def increment
  redirect_to :action => :edit unless request.xhr?

This would fire the edit action fire and display edit view after
increment is executed. This would ensure that the URL does not change.

Additionally, you would have a view called increment.rjs which is the
ruby-javascript code to update the DOM for the AJAX side of things.

Jason Arora