Sha256: fc347485c968452cfd551d73ec0bd048f287c67afad0f1c20e10c2333194d779
Contents?: true
Size: 723 Bytes
Versions: 4
Compression:
Stored size: 723 Bytes
Contents
# frozen_string_literal: true module Maquina module NavbarMenuHelper def menu_options options = {} options[:plans] = maquina.plans_path if Maquina::Current.signed_in? && allowed_to?(:plans?, with: Maquina::NavigationPolicy) options[:users] = maquina.users_path if Maquina::Current.signed_in? && allowed_to?(:users?, with: Maquina::NavigationPolicy) options end def active_menu_option?(path) request.path == path end def profile_menu_options if Maquina::Current.signed_in? { signout: {method: :delete, path: maquina.sessions_path} } else { signin: maquina.new_sessions_path } end end end end
Version data entries
4 entries across 4 versions & 1 rubygems