Currently I do something like this:
+ var go_to = "http://localhost:3000" + url;
+ window.open(go_to);
Which takes it to the Index action of a Rail controller and eventually shows the page.
Two things I want to improve:
1- Definitely hard coding "http://localhost:3000"
is dead wrong. But what is the right way?
2- Is there a better way of talking to Rails from JS side to open a new window?