ホスト名:ポート名 で取得する場合は request.host_with_port を使う

kjirouukjirouu のブックマーク 2013/11/20 17:20

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

Get hostname from Rails controller

    I am trying to get the hostname of the machine which a rails application is running on from the controller. What would be the best way to do this taking into account it should work on both windows ...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう