Module: PagesCore::PageModel::Images

Extended by:
ActiveSupport::Concern
Included in:
Page
Defined in:
app/models/concerns/pages_core/page_model/images.rb

Instance Method Summary collapse

Instance Method Details

#imageObject


27
28
29
# File 'app/models/concerns/pages_core/page_model/images.rb', line 27

def image
  super.try { |i| i.localize(locale) }
end

#image?Boolean

Returns:

  • (Boolean)

23
24
25
# File 'app/models/concerns/pages_core/page_model/images.rb', line 23

def image?
  image_id?
end

#imagesObject


31
32
33
# File 'app/models/concerns/pages_core/page_model/images.rb', line 31

def images
  super.in_locale(locale)
end

#page_imagesObject


35
36
37
# File 'app/models/concerns/pages_core/page_model/images.rb', line 35

def page_images
  super.in_locale(locale)
end