untested test update

This commit is contained in:
2012-11-25 16:32:48 +01:00
parent 545a2b66e6
commit 44e078ac69
2 changed files with 3 additions and 3 deletions
@@ -46,7 +46,7 @@ html lang="en"
li.divider
- else
li[ class=(controller_name == child_item.controller_name ? 'active' : '') ] = link_to child_item.title, child_item.path
- elsif false && menu_item.resource_link?
- elsif menu_item.resource_link?
li[ class=(menu_item.controller_name == controller_name ? 'active' : '')]= link_to menu_item.title, menu_item.path
.btn-group.pull-right
a.btn.dropdown-toggle[data-toggle="dropdown" href="#"]
+2 -2
View File
@@ -99,7 +99,7 @@ module Cmtool
@resource.model_name.human_plural
end
def path
engine.routes.url_helpers.url_for(controller: nested_controller_name, action: 'index', only_path: true)
engine.routes.url_helpers.url_for({controller: nested_controller_name, action: 'index', only_path: true}.merge(@options[:path] || {}))
end
def engine
@@ -115,7 +115,7 @@ module Cmtool
end
def nested_controller_name
if @options[:scope].present?
"#{@options[:scope]}::#{@resource.name}".underscore.pluralize
"#{@options[:scope]}::#{@resource.name.split('::').last}".underscore.pluralize
else
@resource.name.underscore.pluralize
end