lib/simple_navigation/item.rb in simple-navigation-2.5.4 vs lib/simple_navigation/item.rb in simple-navigation-2.6.0

- old
+ new

@@ -73,22 +73,20 @@ # Returns true if both the item's url and the request's url are root_path def root_path_match? url == '/' && SimpleNavigation.controller.request.path == '/' end - # Converts url to url_hash. Accesses routing system, quite slow... Not used at the moment - # def hash_for_url(url) #:nodoc: - # ActionController::Routing::Routes.recognize_path(url, {:method => (method || :get)}) - # end - + # Returns true if the item's id should be added to the rendered output. def autogenerate_item_ids? SimpleNavigation.config.autogenerate_item_ids end + # Returns the item's id which is added to the rendered output. def autogenerated_item_id SimpleNavigation.config.id_generator.call(key) end + # Return true if auto_highlight is on for this item. def auto_highlight? SimpleNavigation.config.auto_highlight && @container.auto_highlight end end \ No newline at end of file