Install
Into Gemfile from rubygems.org:
gem 'annotate'
Into Gemfile from Github:
gem 'annotate', github: 'ctran/annotate_models'
Into environment gems from rubygems.org:
gem install annotate
Into environment gems from Github checkout:
git clone git://github.com/ctran/annotate_models.git annotate_models
cd annotate_models
rake build
gem install pkg/annotate-*.gem
Usage
(If you used the Gemfile install, prefix the below commands with bundle exec.)
Usage in Rails
To annotate all your models, tests, fixtures, and factories:
cd /path/to/app
annotate
To annotate just your models, tests, and factories:
annotate --exclude fixtures
To annotate just your models:
annotate --exclude tests,fixtures,factories,serializers
To annotate routes.rb:
annotate --routes
To remove model/test/fixture/factory/serializer annotations:
annotate --delete
To remove routes.rb annotations:
annotate --routes --delete
To automatically annotate every time you run db:migrate, either run rails g annotate:install or add Annotate.load_tasksto your `Rakefile`. See the configuration in Rails section for more info.