Help us understand the problem. What are the problem?
namespace :admin do resources :users end # rake routes Prefix Verb URI Pattern Controller#Action admin_users GET /admin/users(.:format) admin/users#index POST /admin/users(.:format) admin/users#create new_admin_user GET /admin/users/new(.:format) admin/users#new dit_admin_user GET /admin/users/:id/edit(.:format) admin/users#edit admin_user GET /admin/users/:id(.:format) admin/users#show PATCH /adm
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Pick a username Email Address Password Sign up for GitHub By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails. Already on GitHub? Sign in to your account
Rails で STI(Single Table Inheritance)を使った時の、コントローラの実装をどうするか?という事について書いてみたいと思います。 STI(単一テーブル継承)とは オブジェクト指向の基本概念として、あるクラスを元にサブクラスを定義する継承があります。 この継承は、プログラミング言語ですとと予め機能が提供されていることが多いですが、 RDB ですとテーブル構成によって表現する場合があります。 *1 今回使う STI は、一つのテーブル内に継承関係にあるクラスのカラムを全て持ってしまう方法です。 例として Player クラスを継承した Footballer クラスと Cricketer クラスがあるとします。 親クラスに共通のプロパティ、子クラスがそれぞれのプロパティを持っていますが、これを STI で表現すると以下になります。 テーブルのレコードがどちらの型に
はじめに こんにちは。KitchHikeエンジニアの小川です。KitchHikeでは主にサーバーサイドを担当しています。 少し前のものですが、「DHHはどのようにRailsのコントローラを書くのか (原文)」というすばらしい記事があります。Railsのコントローラ分割の(DHH流)ベストプラクティスについて解説した記事なのですが、私はこの記事に大変感銘を受け、KitchHikeのルーティング定義にもこのプラクティスを取り入れるようになりました。 本日はこのDHH流ルーティングを取り入れることで得られるメリット、実際の routes.rb でのルーティング定義のしかたについて紹介したいと思います。 DHH流ルーティングとは?何がうれしいの? 詳しくは元記事を是非とも読んで下さい・・・なのですが、かいつまむと、ここで示されているのはたったひとつの単純明快なルールです。 コントローラはデフォルト
Article Express.js Express.js Series: A Beginner's Guide to Routing Fundamentals Getting started with Express is not the easiest thing to do, if you have read my previous post on Express' app.js you will have a basic understanding of a default Express app by now. If you haven't, I encourage you to read it. There is one topic that I didn't cover in that article and that is arguably the most importa
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く