Created
April 10, 2012 02:02
-
-
Save klebervirgilio/2347905 to your computer and use it in GitHub Desktop.
Is it possible?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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