Parrot Gem: Simple commenting solution for Rails 3 apps.
Installation
- Add gem 'parrot' to your Gemfile
- Run rake parrot:install:migrations
- Run rake db:migrate
- Run rails g parrot MODEL_NAME
Add subresources to routes
resources RESOURCE_NAME do resources :parrot_comments, controller: 'parrot/comments', path: 'comments' end
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?