osunyorg/admin

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

Summary

Maintainability
A
0 mins
Test Coverage
class Communication::Block::Template::CallToAction < Communication::Block::Template::Base

  has_layouts [
    :accent_background,
    :no_background
  ]

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

  protected

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

end