-
- Downloads
Make the user dropdown reusable
We will reuse the the dropdown, but exclude some menu items based on permissions. So moving the menu to a partial, and adding checks for each menu item here.
Showing
- app/helpers/users_helper.rb 22 additions, 0 deletionsapp/helpers/users_helper.rb
- app/policies/user_policy.rb 4 additions, 2 deletionsapp/policies/user_policy.rb
- app/views/layouts/header/_current_user_dropdown.html.haml 22 additions, 0 deletionsapp/views/layouts/header/_current_user_dropdown.html.haml
- app/views/layouts/header/_default.html.haml 1 addition, 16 deletionsapp/views/layouts/header/_default.html.haml
- qa/qa/page/menu/main.rb 5 additions, 2 deletionsqa/qa/page/menu/main.rb
- spec/helpers/users_helper_spec.rb 25 additions, 0 deletionsspec/helpers/users_helper_spec.rb
- spec/policies/user_policy_spec.rb 13 additions, 5 deletionsspec/policies/user_policy_spec.rb
Please register or sign in to comment