more additions to Usage instructions

This commit is contained in:
cowboycoded 2011-02-10 16:23:32 -05:00
parent b74bb0ee09
commit efd8a6fb7b
1 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,9 @@ Specify actions you want logged in a controller
impressionist :actions=>[:show,:index] impressionist :actions=>[:show,:index]
end end
Make your models impressionable. This allows you to attach impressions to an AR model instance. Make your models impressionable. This allows you to attach impressions to an AR model instance.
Impressionist will automatically log the Model name (based on action_name) and the id (based on params[:id]), but in order to get the count of impressions (example: @widget.impression_count),
you will need to make your model impressionalble
class Widget < ActiveRecord::Base class Widget < ActiveRecord::Base
is_impressionable is_impressionable