Browse Source

Update Bitmasked.md

Mark Sch 8 years ago
parent
commit
aac3df16ac
1 changed files with 2 additions and 1 deletions
  1. 2 1
      docs/Behavior/Bitmasked.md

+ 2 - 1
docs/Behavior/Bitmasked.md

@@ -91,7 +91,8 @@ echo $this->Form->control('status', ['options' => Comment::statuses(), 'multiple
 And in your Table searchManager() setup:
 ```php
 $searchManager
-	->finder('status', ['finder' => 'bits', 'map' => ['status' => 'bits']])
+	// We need to map the posted "status" key to the finder required "bits" key
+	->finder('status', ['finder' => 'bits', 'map' => ['bits' => 'status']])
 ```
 
 This way the array of checkboxes selected will be turned into the integer bitmask needed for the query to work.