Module: Decidim::IconHelper
- Defined in:
- app/helpers/decidim/icon_helper.rb
Overview
Helpers related to icons
Instance Method Summary collapse
-
#feature_icon(feature) ⇒ Object
Public: Returns an icon given an instance of a Feature.
Instance Method Details
#feature_icon(feature) ⇒ Object
Public: Returns an icon given an instance of a Feature. It defaults to a question mark when no icon is found.
feature - The feature to generate the icon for.
Returns an HTML tag with the icon.
12 13 14 15 16 17 18 |
# File 'app/helpers/decidim/icon_helper.rb', line 12 def feature_icon(feature) if feature.manifest.icon external_icon feature.manifest.icon else icon "question-mark" end end |