Sha256: e1a57be027634f155cda4da458a2b544f80b250797364edc8ea26afb0f0f7dd2
Contents?: true
Size: 610 Bytes
Versions: 4
Compression:
Stored size: 610 Bytes
Contents
# frozen_string_literal: true module Decidim # Helper to print Feature references. module FeatureReferenceHelper # Displays the localized reference for the given feature. # # feature - the Feature that has the reference to display. # # Returns a String. def feature_reference(feature) return unless feature.reference @reference = feature.reference "<div class='reference'>#{localized_reference}</div>".html_safe end private def localized_reference I18n.t("reference", reference: @reference, scope: "decidim.shared.reference") end end end
Version data entries
4 entries across 4 versions & 1 rubygems