app/models/spotlight/contact.rb in blacklight-spotlight-0.3.1 vs app/models/spotlight/contact.rb in blacklight-spotlight-0.4.1
- old
+ new
@@ -12,10 +12,14 @@
## carrierwave-crop doesn't want to store the crop points. we do.
# so instead of this:
#crop_uploaded :avatar ## Add this
# we do this:
after_save do
- recreate_avatar_versions if avatar.present?
+ if avatar.present?
+ avatar.cache! if !avatar.cached?
+ avatar.store!
+ recreate_avatar_versions
+ end
end
before_save on: :create do
self.show_in_sidebar = true if show_in_sidebar.nil?
end