app/views/layouts/authz/_menu.html.slim in authz-0.0.1.alpha3 vs app/views/layouts/authz/_menu.html.slim in authz-0.0.1.alpha4
- old
+ new
@@ -1,14 +1,21 @@
aside.menu
ul.menu-list
- li = link_to 'Home', root_path, class: "#{'is-active' if current_page? root_path}"
+ li
+ = link_to main_app.root_path do
+ span Back to Main App 
+ i.fa-sign-out.fa 
+
+ li = authz_link_to 'Dashboard', root_url, {class: "#{'is-active' if current_page? root_path}"}, skip_scoping: true
+
p.menu-label Authorization
ul.menu-list
- li = link_to 'Roles', roles_path, class: "#{'is-active' if current_page? roles_path}"
- li = link_to 'Business Processes', business_processes_path, class: "#{'is-active' if current_page? business_processes_path}"
- li = link_to 'Controller Actions', controller_actions_path, class: "#{'is-active' if current_page? controller_actions_path}"
+ li = authz_link_to 'Roles', roles_path, {class: "#{'is-active' if current_page? roles_path}"}, skip_scoping: true
+ li = authz_link_to 'Business Processes', business_processes_path, {class: "#{'is-active' if current_page? business_processes_path}"}, skip_scoping: true
+ li = authz_link_to 'Controller Actions', controller_actions_path, {class: "#{'is-active' if current_page? controller_actions_path}"}, skip_scoping: true
+
p.menu-label Rolables
ul.menu-list
- Authz.rolables.map(&:authorizable_association_name).each do |association_name|
- li = link_to association_name.to_s.titleize, send("#{association_name}_path"), class: "#{'is-active' if current_page? send("#{association_name}_path")}"
+ li = authz_link_to association_name.to_s.titleize, send("#{association_name}_path"), {class: "#{'is-active' if current_page? send("#{association_name}_path")}"}, skip_scoping: true
/ p.menu-label Scoping