noesya/osuny

View on GitHub
app/models/communication/block/template/image.rb

Summary

Maintainability
A
0 mins
Test Coverage
C
77%
class Communication::Block::Template::Image < Communication::Block::Template::Base

  has_component :image, :image
  has_component :alt, :string
  has_component :credit, :rich_text
  has_component :text, :rich_text

  protected

  def check_accessibility
    super
    accessibility_warning 'accessibility.commons.alt.empty' if image_component.blob && alt.blank?
  end

end