
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
associations - Rails migration: t.references with alternative name? - Stack Overflow
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
associations - Rails migration: t.references with alternative name? - Stack Overflow
So I have a create_table like this for Courses at a School: create_table :courses do |t| t.string... So I have a create_table like this for Courses at a School: create_table :courses do |t| t.string :name t.references :course t.timestamps end but I want it to reference two other courses like: has_many :transferrable_as # A Course has_many :same_as # Another Course Can I say the following? t.references :transferrable_as, :as=> :course
2016/03/22 リンク