タグ

2010年3月3日のブックマーク (2件)

  • IEBlog

    Internet Explorer Team Blog We've moved! Find us at the new Microsoft Edge Dev Blog As we announced last week, with the reveal of Microsoft Edge we are archiving the IEBlog. Future... Author: ieblog Date: 05/08/2015 Microsoft Edge is the browser for Windows 10 This morning, Joe Belfiore took to the stage at Build 2015 to share more about the next chapter in... Author: ieblog Date: 04/29/2015 Annou

    IEBlog
  • 83's : Rails

    t.referencesで外部キーの定義をちょっと簡単に、しかし明確に書ける February 21, 2008 23:00 Permalink Comments (137) Trackbacks (0) Rails, ActiveRecord なんでかこういうちょっと気の利いたやつは知るとうれしくなってしまう。 マイグレーションでt.integer :tag_idと書くところをt.references :tagと書けるんだってさ。 確かに関連に使うフィールドはintのxxx_idって規約で決まってんだから、いちいちそんなこと書きたくないよね。 「referencesってintegerより長くなって指が絡まりそうだYO!」と言いたくなる衝動は :polymorphic => trueあたりを見てなだめていただきたい。DRY優先。 詳しくは以下。 TableDefinition#refere