The schema comment looks like this:

# == Schema Info
#
# Table name: line_items
#
#  id                  :integer(11)    not null, primary key
#  quantity            :integer(11)    not null
#  product_id          :integer(11)    not null
#  unit_price          :float
#  order_id            :integer(11)
#

 class LineItem < ActiveRecord::Base
   belongs_to :product
 end

github文档

generate annotation for a single model :

annotate --exclude tests,fixtures,factories -i app/models/my_model.rb

带commet

 annotate --with-comment --exclude tests,fixtures,factories -i app/models/my_model.rb
0条评论 顺序楼层
请先登录再回复