Sha256: 1ab9388640c6cc07392dfcb902064cbdcfc51c9e4551d71ae45374af7d8ce5d8

Contents?: true

Size: 241 Bytes

Versions: 3

Compression:

Stored size: 241 Bytes

Contents

module HTMLEscapeHelper
  def translated_string(key)
    if Rails.version >= "7.0"
      ERB::Util.html_escape_once(I18n.t(key))
    else
      I18n.t(key)
    end
  end
end

RSpec.configure do |config|
  config.include HTMLEscapeHelper
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
clearance-2.8.0 spec/support/html_escape_helper.rb
clearance-2.7.2 spec/support/html_escape_helper.rb
clearance-2.7.0 spec/support/html_escape_helper.rb