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 and linux?
![Get hostname from Rails controller](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)
はじめに ルーティングとは シンプルな例 デバッグ Resource Routing 生成されるルート 基本 idを伴わない場合 Namespace - path and controller prefix Scope - controller prefix Scope - path prefix Nested Resources - has_manyな場合に member, collection - 追加のアクション collection と match Non-Resourceful Routes Dynamic Static query strings Defaults Naming - matchでも名前を付ける Constraints (HTTP verb) - HTTPメソッドで制約する Constraints (parameter) - パラメータを制約する Constrai
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く