some fixes for controller names
This commit is contained in:
parent
051766915f
commit
72881189e8
|
@ -38,6 +38,8 @@ this.Bullseye = {
|
|||
break;
|
||||
}
|
||||
|
||||
controller = controller.replace('/', '-');
|
||||
|
||||
if (this.targets[controller] && this.targets[controller][action]) {
|
||||
this.targets[controller][action].apply(this.context);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ module Bullseye
|
|||
end
|
||||
|
||||
def parts
|
||||
@source.split('/')
|
||||
@parts ||= @source.split('/')
|
||||
end
|
||||
|
||||
class PartFinder
|
||||
|
|
|
@ -15,7 +15,7 @@ module Bullseye
|
|||
end
|
||||
|
||||
def __bullseye_controller
|
||||
@__bullseye_controller || controller_path
|
||||
@__bullseye_controller || controller_path.gsub('/', '-')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@ module Bullseye
|
|||
end
|
||||
|
||||
def evaluate(scope, locals, &block)
|
||||
@source = scope.logical_path[1..-1]
|
||||
@source = scope.logical_path.gsub(%r{^[^/]*/}, '')
|
||||
|
||||
<<-JS
|
||||
Bullseye.target('#{controller}', #{actions.to_json}, function() {
|
||||
|
|
Loading…
Reference in New Issue