Is there a reason you need to use JavaScript for this? If not, you can access the current full URL directly through Rails:
render "abc", :update_path => request.original_url
request.original_url
would give you something similar to http://mysite.com/my_controller/my_action?my_params=...
(i.e. it includes the full url, not just the part after the host/port). If you only need the path portion, you can do request.fullpath
which would give you /my_controller/my_action?my_params=...
.
See How do I get the current absolute URL in Ruby on Rails? for more info.