Module: Maquina::NavbarMenuHelper
- Defined in:
- app/helpers/maquina/navbar_menu_helper.rb
Instance Method Summary collapse
Instance Method Details
#active_menu_option?(path) ⇒ Boolean
13 14 15 |
# File 'app/helpers/maquina/navbar_menu_helper.rb', line 13 def (path) request.path == path end |
#menu_options ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/helpers/maquina/navbar_menu_helper.rb', line 5 def = {} [:plans] = maquina.plans_path if Maquina::Current.signed_in? && allowed_to?(:plans?, with: Maquina::NavigationPolicy) [:users] = maquina.users_path if Maquina::Current.signed_in? && allowed_to?(:users?, with: Maquina::NavigationPolicy) end |
#profile_menu_options ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/helpers/maquina/navbar_menu_helper.rb', line 17 def if Maquina::Current.signed_in? { signout: {method: :delete, path: maquina.sessions_path} } else { signin: maquina.new_sessions_path } end end |