Calling ruby from javascript
Is there a way to call a jruby function from javascript, let's say that I need my user interface to be on the browser side.
Note: I'm not using Ruby on Rails
~ Eder 开发者_StackOverflow社区Quiñones
Short answer
No.
Long answer
You can create some server side application and call it through AJAX.
UPD
And yes: How do you create a Java applet using JRuby? :D
Not directly. But you can use AJAX to send a request to ruby code on the back-end. That code can then send data to the front-end in the AJAX response (for example, as JSON).
精彩评论