开发者

Calling a Ruby method via a button

开发者 https://www.devze.com 2023-04-10 10:53 出处:网络
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.

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

精彩评论

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

关注公众号