开发者

Calling a Ruby method via a button

Quick question, what's the best way to call a ruby method via开发者_如何学JAVA a button? At the moment, the button will only call a JS function but I need it carry out a Ruby method.

Basically, the button has to compare an Excel spreadsheet with my database and display the difference in a table on another page. How can I create that page without generating a new model? Sorry for the stupid question, but I've only been sticking to the conventions, hence I am unsure as to how I should create a new page.

Thanks in advance for any help


Take a look at the button_to method.

<%= button_to "Compare Excel", :action => "compareExcel" %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜