Module: Decidim::FeatureReferenceHelper
- Defined in:
- app/helpers/decidim/feature_reference_helper.rb
Overview
Helper to print Feature references.
Instance Method Summary collapse
-
#feature_reference(feature, options = {}) ⇒ Object
Displays the localized reference for the given feature.
Instance Method Details
#feature_reference(feature, options = {}) ⇒ Object
Displays the localized reference for the given feature.
feature - the Feature that has the reference to display. options - An optional hash of options
* class: A string of extra css classes
Returns a String.
13 14 15 16 17 |
# File 'app/helpers/decidim/feature_reference_helper.rb', line 13 def feature_reference(feature, = {}) return unless feature.reference @reference = feature.reference "<div class='reference #{options[:class]}'>#{localized_reference}</div>".html_safe end |