Skip to content

Instantly share code, notes, and snippets.

@knewter
Created May 27, 2011 04:00
Show Gist options
  • Save knewter/994617 to your computer and use it in GitHub Desktop.
Save knewter/994617 to your computer and use it in GitHub Desktop.
--(jadams@viggyviggy)-(20/pts/1)-(2300/26-May-11)--
--($:~/rails/refinerycms)(rails-3-1-master-merge)ruby-1.9.2-p180@refienrycms--
$ git diff core/lib/refinery/helpers/menu_helper.rb
diff --git a/core/lib/refinery/helpers/menu_helper.rb b/core/lib/refinery/helpers/menu_helper.rb
index d2af4e7..70013c3 100644
--- a/core/lib/refinery/helpers/menu_helper.rb
+++ b/core/lib/refinery/helpers/menu_helper.rb
@@ -89,7 +89,11 @@ module Refinery
# Now use all possible vectors to try to find a valid match,
# finally passing to rails' "current_page?" method.
- [path, URI.decode(path)].include?(url) || path == "/#{page.id}" || current_page?(page)
+ begin
+ [path, URI.decode(path)].include?(url) || path == "/#{page.id}" || current_page?(page)
+ rescue
+ true
+ end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment