Topic: Onchange

I am new to Ruby/Rails.  I have a page which I need to change.  It has two dropdown menus and I want the second dropdown to be filled in based on the selection of the first dropdown.

In normal HTML/PHP/JavaScript, I would use OnClick or OnChange to click a phantom refresh button which would case the same module to be called so it could do the work.

I am struggling with how to call modules with Ruby/Rails so I don't know what I need to do to call myself when a click is done.