called javascript method and ruby method with 1 button?

You can use button_to_function with remote_function to create a button
that will use Ajax to call an action in your controller.

The method remote_function takes the same parameters as
link_to_remote, which means that you can then use parameters
like :before, :after, :complete, etc. to call arbitrary JavaScript at
various points during the Ajax request.

For example:

<%= button_to_function("Click me", remote_function(:url => {:action
=> :do_stuff}, :before => "myJavaScriptFunction()")) %>