Skip to content

Instantly share code, notes, and snippets.

@andruu
Created December 15, 2011 05:26
Show Gist options
  • Save andruu/1479945 to your computer and use it in GitHub Desktop.
Save andruu/1479945 to your computer and use it in GitHub Desktop.
if cookies[:post_view][@post.id].blank?
cookies[:post_view][@post.id] = true
@post.increment!(:view_count)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment