Commit a9e3deea
Changed files (2)
app
models
app/models/favorite.rb
@@ -1,4 +1,4 @@
class Favorite < ActiveRecord::Base
belongs_to :user
- belongs_to :creation, :counter_cache => true
+ belongs_to :creation, :counter_cache => true, touch: true
end
app/models/photo.rb
@@ -1,5 +1,5 @@
class Photo < ActiveRecord::Base
- belongs_to :creation, :counter_cache => true
+ belongs_to :creation, :counter_cache => true, touch: true
validates :image, :presence => true
mount_uploader :image, PhotoUploader
process_in_background :image if Rails.env.test?