简体   繁体   中英

How to pass url as a parameter in Ruby on rails?

I have a third party game on my page. The game accepts a .js file with the settings hosted on my server. I am trying to pass it like this:

Rails.public_path + '/settings.js'

I expect the result to be:

 www.gameproviderspage.com?settings=www.mypage.com/public/settings.js

But I am getting:

 www.gameproviderspage.com?settings=www.gameproviderspage.com/public/settings.js
request.original_url + '/settings.js'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM