Sha256: 51ec6d0289246de7516baee13c26123f46647c3ab7e768d98dc19034fb9c40b1
Contents?: true
Size: 534 Bytes
Versions: 13
Compression:
Stored size: 534 Bytes
Contents
module Shopapp3Helper def shopapp3_sidebar_icons controller.sidebar_actions_list.map do |sidebar_action| active = if controller.request.path == sidebar_action[:path] 'active' end <<~HTML <li class="nav-item d-flex justify-content-center py-3 #{active}"> <a class="nav-link" href="#{sidebar_action[:path]}"> #{image_tag sidebar_action[:icon], width: '20', class: 'img-fluid'} </a> </li> HTML end.join("\n").html_safe end end
Version data entries
13 entries across 13 versions & 1 rubygems