Acts As Countable plugin

Plugin details

A plugin like acts_as_commentable and acts_as_rateable but can count visit times on some object.

Websitehttp://www.caiwangqin.com/post/401 Repositoryhttp://actsascountable.googlecode.com/svn/trunk/ Author Caiwangqin Tags ActiveRecord, count LicenseRuby's (MIT)

Documentation

Install the plugin:
ruby script/plugin install http://actsascountable.googlecode.com/svn/trunk/

1. put acts_as_countable inside model, like acts_as_commentable

2. in view action:

    count = Count.new
    count.countable_id = @obj.id
    @obj.add_count(count)


Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 10 months ago