Skip to content

Commit

Permalink
provide one-liner for counter_cache migration via rails g m
Browse files Browse the repository at this point in the history
  • Loading branch information
fwolfst committed Apr 18, 2017
1 parent f38d4cd commit ef3f9ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ It is as simple as this:

t.integer :my_column_name, :default => 0

If you want to use the typical Rails 4 migration generator, you can:

rails g migration AddImpressionsCountToBook impressions_count:int

What if I only want to record unique impressions?
-------------------------------------------------
Maybe you only care about unique impressions and would like to avoid
Expand Down

0 comments on commit ef3f9ea

Please sign in to comment.