fatfreecrm/fat_free_crm

View on GitHub
app/views/layouts/_sidebar.html.haml

Summary

Maintainability
Test Coverage
- view   ||= controller.controller_name
- action ||= controller.action_name
- sidebar = "#{view}/sidebar_#{action}" unless action.to_s == 'show'
- sidebar = "admin/#{sidebar}" if controller.class.to_s.starts_with?("Admin::")

= content_for :sidebar
- begin
  = render sidebar if sidebar
  - rescue MissingTemplate

= render "lists/lists"
= render "shared/recently"