Parrot Gem: Simple commenting solution for Rails 3 apps.

Installation

  1. Add gem 'parrot' to your Gemfile
  2. Run rake parrot:install:migrations
  3. Run rake db:migrate
  4. Run rails g parrot MODEL_NAME
  5. Add subresources to routes

    resources RESOURCE_NAME do resources :parrot_comments, controller: 'parrot/comments', path: 'comments' end

  6. Add commenting relation to your commenters:

    has_many :comments, :class_name => Parrot::Comment, :foreign_key => :author_id

Notes

  • By default it calls to_s on commenter name. You may want to alias it to name for example, so it doesn't show the Ruby "ugly" object.

To-do

  • Flash responders working?
  • How to reopen parrot's subclasses from parent applications?