Skip to content

Instantly share code, notes, and snippets.

@joemsak
Created August 17, 2009 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joemsak/168836 to your computer and use it in GitHub Desktop.
Save joemsak/168836 to your computer and use it in GitHub Desktop.
#views/root/index.html.erb
<%= link_to 'Home', root_path, :class => 'hide ' + is_page?('root'), :id => 'nav-home' %>
#application_helper.rb
def is_page?(t)
return 'here' if t == params[:controller]
return 'menu'
end
#error resolved!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment