module NavigationHelper
Public Instance Methods
current_path()
click to toggle source
# File lib/nav_helper.rb, line 4 def current_path request.path end
current_path?(path, root = '/')
click to toggle source
# File lib/nav_helper.rb, line 8 def current_path?(path, root = '/') if path == root current_path == path else (/\A#{path}(\/.*)?\Z/ =~ current_path).present? end end