DEV Community

Samuel Lubliner
Samuel Lubliner

Posted on • Updated on

Annotate Gem

db/schema.rb

  • Contains the record of the database.
  • NEVER edit this file
  • It is auto-generated from running

rake db:migrate

Instead of constantly referencing db/schema.rb, install the annotate gem.

Add the gem to the :development group of the Gemfile.

bundle install

annotate --models

This creates a rake task file lib/tasks/auto_annotate_models.rake

rake db:migrate runs the annotation automatically.

Now at the top of app/models/like.rb, see the annotations.

Top comments (0)