Skip to content

Instantly share code, notes, and snippets.

@klebervirgilio
Created April 10, 2012 02: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 klebervirgilio/2347905 to your computer and use it in GitHub Desktop.
Save klebervirgilio/2347905 to your computer and use it in GitHub Desktop.
Is it possible?
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -11,7 +11,11 @@ module ApplicationHelper
protected
#### :(
def link_href_for(item)
- item.top_level? and item.link_to_internal_route.present? ? item.link_to_internal_route : (item.page || item.url || '#')
#### :)
+ if item.top_level? and item.link_to_internal_route.present?
+ item.link_to_internal_route
+ else
+ item.page || item.url || '#'
+ end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment