William A. Anders, the astronaut behind perhaps the single most iconic photo of our planet, has died at the age of 90. On Friday morning, Anders was piloting a small…
William A. Anders, the astronaut behind perhaps the single most iconic photo of our planet, has died at the age of 90. On Friday morning, Anders was piloting a small…
今度は「Rails3 失敗から学ぶDevise利用時のURL設計 - 130単位」のコメントをきっかけに考えてみました。 routes.rbの書き換え 新規登録のときに確認画面や完了画面がほしいという場合はよくあります。 もともと match 'user_entry/profile' match 'user_entry/setting' post 'user_entry/confirm' post 'user_entry/create' get 'user_entry/complete' だったものを、 resource :user, :only => :show do resource :profile, :except => [:show, :destroy] resource :setting, :except => [:show, :destroy] end とするのはどうか、と考
Webアプリのルーティングにおいて、各ユーザの個別ページを特殊なものにしたい場合にどういうURLにすると便利かという話に触れる。例えばr7kamuraというIDのユーザ用のページは、Twitterだと https://twitter.com/r7kamura で、GitHubだと https://github.com/r7kamura というURLになっている。 GET /:id だと他のパターンと衝突してしまう もしユーザページに GET /:id というパターンを採用すると、他のURLのパターンと競合してしまうという問題がある。どんなときに困るかと言うと、例えば https://twitter.com/about でTwitterというサービスについて説明するWebページを提供しようとすると、aboutというIDを持ったユーザ用のページが提供できなくなってしまう。 この問題に対してよく
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く