Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created January 2, 2009 18:20
Show Gist options
  • Save ahoward/42628 to your computer and use it in GitHub Desktop.
Save ahoward/42628 to your computer and use it in GitHub Desktop.
def tabs_for_student
home = tab('Home', student_home_path)
partners = tab('Partners', student_classrooms_path)
partners.active do
uri = request.request_uri
(
uri =~ %r|student/classrooms| or
uri =~ %r|classroom/[^/]+/[^/]*profile|
)
end
[ home, partners ]
end
helper_method 'tabs_for_student'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment