annotated-rails Build Status

Provides schema annotation for your models.

Like this:

class Post < ActiveRecord::Base
  ...
end
#--
# generated by 'annotated-rails' gem, please do not remove this line and content below, instead use `bundle exec annotate-rails -d` command
#++
# Table name: posts
#
# * id             :integer         not null
#   title          :string(30)
#   content        :text
#   slug           :string(255)     not null
#   author_name    :string(255)
#   comments_count :integer         default 0
#   created_at     :datetime        not null
#   updated_at     :datetime        not null
#
#  Indexes:
#   index_posts_on_slug  slug
#--
# generated by 'annotated-rails' gem, please do not remove this line and content above, instead use `bundle exec annotate-rails -d` command
#++

Inspired by ctran/annotate_models

For using with 3.x rails, do not tested against earlier versions.

Installation

Add this line to your rails Gemfile:

group :development do
  gem 'annotated-rails'
end

And then execute:

$ bundle

Usage

To annotate:

  bundle exec annotate-rails

To remove annotation:

  bundle exec annotate-rails -d

To see CLI help:

  bundle exec annotate-rails -h|--help

Future plans

Testing

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Add tests for your changes
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request