Is it possible to execute a Javascript function included in application.js or the corresponding js.coffee file from a controller, but without rendering or reloading the view? I.e. just a simple
def connect()
call js: "connect_through_javascript();"
render :nothing => true
end
but instead of rendering :nothing, is there some way the view could be left untouched? Also would it be possible to send params with it, i.e.
def connect(param1, param2, param3)
call js: "connect_through_javascript(#{param1}, #{param2}, #{param3});"
render :nothing => true
end
The Javascript function called will in turn go to another controller action for it's callback.
I'm about to try with the Paloma gem, but I just wanted to know if any of this is possible without adding dependencies.