Sha256: 5d26822af6446bf7285ddc3f6b8efc8b1d9cdc785482caea499e9f0954fc1dea
Contents?: true
Size: 560 Bytes
Versions: 7
Compression:
Stored size: 560 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, class: "show-for-small-only" 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
7 entries across 7 versions & 1 rubygems