I'm researching a project that uses a system component loaded on the
page through a custom JS file.
I'm having a little trouble understanding exactly what you're trying to
do. I'll take a stab, but in case i totally misunderstand you, i'll ask
a few questions that, if my response is no help, may make it easier to
For starters, what's a 'system component'? And whatever it is, is this
the thing that you want go get loaded when the user takes some action?
On defined user actions,
So we're talking about clicking a link or a button?
this component will call a definable JS method,
Definable? As in 'not known until run-time'?
that i'd like to act in a link_remote_to fashion, to update some
elements of the page.
link_to_remote(...) makes an XHR / XMLHttpRequest to a controller method
on the server. In Rails you have several options WRT constructing the
JS response the client expects. The easiest is an RJS template that
replaces existing html element(s) on the page.
I highly recommend Cody Fauser's O'Reilly Shortcut: RJS Templates. Best
$10 I've spent on Rails so far.
link_to_function(...) calls a JS function you specify in the call.
Write back if that doesn't help.