annotate_models--rails必攜pluginの一つ[轉]

install

script/plugin install http://svn.pragprog.com/Public/plugins/annotate_models

使い方

rake annotate_models

これで、

# == Schema Information
# Schema version: 13
#
# Table name: categories
#
#  id   :integer(11)   not null, primary key
#  name :string(255)   
# 

class Category < ActiveRecord::Base
  has_many :theme, :dependent => :destroy

こんな感じのができ上がる。便利。

發佈了7 篇原創文章 · 獲贊 0 · 訪問量 1753
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章