Class: PageImage

Inherits:
ApplicationRecord
  • Object
show all
Includes:
PagesCore::Sweepable
Defined in:
app/models/page_image.rb

Instance Attribute Summary

Attributes included from PagesCore::Sweepable

#cache_swept

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.cleanup!Object



19
20
21
22
23
# File 'app/models/page_image.rb', line 19

def cleanup!
  all.find_each do |page_image|
    page_image.destroy unless page_image.image
  end
end

Instance Method Details

#imageObject



26
27
28
# File 'app/models/page_image.rb', line 26

def image
  super.localize!(locale)
end