Skip to content

Instantly share code, notes, and snippets.

@doombongo
Forked from tagrudev/application_helper.rb
Created November 30, 2012 08:33
Show Gist options
  • Save doombongo/4174536 to your computer and use it in GitHub Desktop.
Save doombongo/4174536 to your computer and use it in GitHub Desktop.
<%= link_to "Get involved", involves_path, class: "#{cp(involves_path,new_volunteer_path)} link"
module ApplicationHelper
def cp(*paths)
paths.each do |path|
"current" if current_page?(path)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment