Sha256: e6bb3aec1540de4893febcd5caa457f7a3c75519eb944a0e9d0f0427d1cae781
Contents?: true
Size: 530 Bytes
Versions: 50
Compression:
Stored size: 530 Bytes
Contents
module AmaLayout class NavigationDecorator < Draper::Decorator delegate_all def items object.items.map { |i| i.decorate } end def sign_out_link return "" unless user h.content_tag :li do h.concat h.link_to "Sign Out", "/logout" end end def top_nav h.render partial: "ama_layout/top_nav", locals: { navigation: self } if items.any? end def sidebar h.render partial: "ama_layout/sidebar", locals: { navigation: self } if items.any? end end end
Version data entries
50 entries across 50 versions & 1 rubygems