Skip to content

Commit

Permalink
small doc fix for readme step 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Torsten Ruger committed Dec 3, 2016
1 parent b96921d commit 6f2783a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ Usage
controller if you are using this method. If you add "impressionist" to the
top of your controller and also use this method in your action, it will
result in 2 impressions being logged (but associated with one request_hash).
If you're using [friendly_id](https://github.com/norman/friendly_id) be sure
to log impressionist this way, as params[:id] will return a string(url slug)
while impressionable_id is a Integer column in database.
If you're using [friendly_id](https://github.com/norman/friendly_id) be sure
to log impressionist this way, as params[:id] will return a string(url slug)
while impressionable_id is a Integer column in database. Also note that you
have to take step #3 for the Widget model for this to work.

def show
@widget = Widget.find
Expand All @@ -119,7 +120,7 @@ Usage
in turn will give you impressions with unique params.

@widget.impressionist_count(:filter => :params)

8. Get the unique impression count from a model filtered by session hash. Same
as #6 regarding request hash. This may be more desirable than filtering by
IP address depending on your situation, since filtering by IP may ignore
Expand Down Expand Up @@ -188,7 +189,7 @@ impressions in your controller:

# only record impression if session is unique
impressionist :unique => [:session_hash]

# only record impression if param is unique
impressionist :unique => [:params]

Expand Down

0 comments on commit 6f2783a

Please sign in to comment.