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



17
18
19
20
21
# File 'app/models/page_image.rb', line 17

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

Instance Method Details

#imageObject



24
25
26
# File 'app/models/page_image.rb', line 24

def image
  super.localize!(locale)
end