Skip to content

Instantly share code, notes, and snippets.

@glideranderson
Created March 13, 2012 18:03
Show Gist options
  • Save glideranderson/2030319 to your computer and use it in GitHub Desktop.
Save glideranderson/2030319 to your computer and use it in GitHub Desktop.
Rails Sidebar Tactic Loop
.sidebar
.sidebar-top.hide-on-phones
%dl.nice.vertical.tabs
- current_workplan.objectives.each do |o|
%dd.active
= link_to o, workplan_objective_path(current_workplan, o)
%span.arrows.hide-on-phones
%span.loop
%ul.children
- o.tactics.each do |t|
%li
= link_to t, workplan_objective_tactic_path(current_workplan, o)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment