- 追加された行はこの色です。
- 削除された行はこの色です。
* Ruby On Rails - tips [#qdb4a77c]
* Ruby On Rails - Tips [#rd4f9cfe]
** Annotate Models Plugin [#zfdfb48f]
- インストール
script/plugin install http://svn.pragprog.com/Public/plugins/annotate_models
** DEPRECATION WARNING: end_form_tag [#k2cc9e63]
It means you should replace this:
1. <%= start_form_tag ... %>
2. ...
3. <%= end_form_tag %>
- 使い方
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
. . .
~
一応バックアップはとってください.
With this:
1. <% form_tag ... do %>
2. ...
3. <% end %>