Skip to content

Instantly share code, notes, and snippets.

@rajib
Created May 7, 2010 11:16
Show Gist options
  • Save rajib/393296 to your computer and use it in GitHub Desktop.
Save rajib/393296 to your computer and use it in GitHub Desktop.
highliting tab
def fetch_class(path)
current_page?(path) ? "class = 'current'" : ""
end
Example: <li <%= fetch_class(new_request_path) %>> text </li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment