Ruby/Ruby On Rails/Tips のバックアップ差分(No.1)


  • 追加された行はこの色です。
  • 削除された行はこの色です。
* Ruby On Rails - tips [#qdb4a77c]

** Annotate Models Plugin [#zfdfb48f]
- インストール
 script/plugin install http://svn.pragprog.com/Public/plugins/annotate_models

- 使い方
 rake annotate_models
~
これでapp/models以下のファイルに下記のようなコメントをDBから抽出してつけてくれます.
 # Schema as of Mon Feb 27 00:55:58 CST 2006 (schema version 7)
 #
 #  id                  :integer(11)   not null
 #  name                :string(255)
 #  description         :text
 #  image_location      :string(255)
 #  price               :float         default(0.0)
 #  available_at        :datetime
 #
 
 class Product < ActiveRecord::Base
 
   validates_presence_of :name, :description
     . . .
~
一応バックアップはとってください.