Permalink
Browse files

Remove incorrect documentation

We don't actually use current_page? at all.
  • Loading branch information...
parndt committed Aug 23, 2012
1 parent 9c2261e commit 4f62d4f7a15ceded57c6ad32b104c7eca27a4b35
Showing with 1 addition and 3 deletions.
  1. +1 −3 core/app/helpers/refinery/menu_helper.rb
@@ -38,7 +38,6 @@ def selected_page_or_descendant_page_selected?(page)
end
# Determine whether the supplied page is the currently open page according to Refinery.
- # Also checks whether Rails thinks it is selected after that using current_page?
def selected_page?(page)
path = request.path
path = path.force_encoding('utf-8') if path.respond_to?(:force_encoding)
@@ -57,8 +56,7 @@ def selected_page?(page)
url << ['', page.url[:path]].compact.flatten.join('/') if page.url.respond_to?(:keys)
url = url.last.match(%r{^/#{::I18n.locale.to_s}(/.*)}) ? $1 : url.detect{|u| u.is_a?(String)}
- # Now use all possible vectors to try to find a valid match,
- # finally passing to rails' "current_page?" method.
+ # Now use all possible vectors to try to find a valid match
[path, URI.decode(path)].include?(url) || path == "/#{page.original_id}"
end

0 comments on commit 4f62d4f

Please sign in to comment.