views:

148

answers:

0

Houston we have a problem: I have a table with drop_receiving divs inside cells. And i have set of draggable widgets - divs also. I need to call methods of my controller onDrop with sending drop_receiving div id and widget id to it.

P.S. I think in future only ids of divs are not enough, but now i want to understand how to make Ajax request in Rails that calls a method of my controller sending parameters to it.

P.P.S. I think how to do it in a REST style.

What should I do? What should I read? I saw only Ajax change page content, but I want Javascript event change the model state through the controller method.