diff --git a/templates/genericTemplates/toggle.php b/templates/genericTemplates/toggle.php
index ae98999..426249c 100644
--- a/templates/genericTemplates/toggle.php
+++ b/templates/genericTemplates/toggle.php
@@ -1 +1 @@
-= $this->Form->postLink(__('Toggle'), ['action' => 'toggle', $entity->id], ['confirm' => __('Are you sure you want to toggle {0} of {1}?', $fieldName. $entity->id)]) ?>
\ No newline at end of file
+= $this->Form->postLink(__('Toggle'), ['action' => 'toggle', $entity->id, $fieldName], ['confirm' => __('Are you sure you want to toggle {0} of {1}?', $fieldName. $entity->id)]) ?>
\ No newline at end of file
diff --git a/templates/layout/default.php b/templates/layout/default.php
index 4c69c61..d42f2cd 100644
--- a/templates/layout/default.php
+++ b/templates/layout/default.php
@@ -40,6 +40,7 @@ $cakeDescription = 'Cerebrate';
= $this->Html->script('bootstrap.bundle.js') ?>
= $this->Html->script('main.js') ?>
= $this->Html->script('bootstrap-helper.js') ?>
+ = $this->Html->script('api-helper.js') ?>
= $this->fetch('meta') ?>
= $this->fetch('css') ?>
= $this->fetch('script') ?>
@@ -66,5 +67,6 @@ $cakeDescription = 'Cerebrate';
+