ikuseiGmbH/smart-village-app-cms

View on GitHub
app/helpers/i18n_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
module I18nHelper
  # returns all entries inside `json` divided by html `<br />` to be rendered in a multiline way
  #   DE: asdasd
  #   PL: cvbcvbasdas
  def i18n_json_to_text(json)
    json.map { |key, value| "#{key.upcase}: #{value}" }.join("<br />").html_safe
  end
end