Module: Decidim::HtmlSafeFlash

Extended by:
ActiveSupport::Concern
Included in:
Verifications::AuthorizationsController
Defined in:
decidim-core/app/controllers/concerns/decidim/html_safe_flash.rb

Overview

This module allows creating flash messages that are HTML safe by providing the flash key in the flash hash.

Examples:

Setting HTML safe flash in a controller

class YourController
  include Decidim::HtmlSafeFlash

  def create
    YourRecord.create!(record_params)

    flash[:html_safe] = true
    flash[:success] = t(".record_created_html")
  end
end