diff options
| author | mo khan <mo@mokhan.ca> | 2013-07-06 04:41:08 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-07-06 04:41:08 -0600 |
| commit | 5de9ec968d4b6fde4fa597e1ea463e91c6bcafee (patch) | |
| tree | c66fb41658892e1c088a7b601db606202d62fb1d /app/models/creation.rb | |
| parent | 64fc4ee7a8da9742c04ba189f05737a6d6075d7c (diff) | |
add creations counter_cache
Diffstat (limited to 'app/models/creation.rb')
| -rw-r--r-- | app/models/creation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/creation.rb b/app/models/creation.rb index 3cb64db2..6b8c3155 100644 --- a/app/models/creation.rb +++ b/app/models/creation.rb @@ -4,7 +4,7 @@ class Creation < ActiveRecord::Base acts_as_commentable validates :name, :presence => true attr_accessible :user_id, :story, :name, :category_ids, :is_restricted, :watermark - belongs_to :user + belongs_to :user, :counter_cache => true has_and_belongs_to_many :categories, :join_table => 'creations_categories', :uniq => true, :autosave => true has_many :photos, :dependent => :destroy, :order => :created_at has_many :favorites, :dependent => :destroy |
