Expire cache when adding documents and images
Proposals and budget investments were not correctly updated when adding, removing or modifying their documents and images.
This commit is contained in:
@@ -12,7 +12,7 @@ class Image < ApplicationRecord
|
||||
hash_secret: Rails.application.secrets.secret_key_base
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :imageable, polymorphic: true
|
||||
belongs_to :imageable, polymorphic: true, touch: true
|
||||
|
||||
validates :title, presence: true
|
||||
validate :validate_title_length
|
||||
|
||||
Reference in New Issue
Block a user