Skip to content

Commit

Permalink
Added missing 'Session'-Compomnent in bake
Browse files Browse the repository at this point in the history
If a Controller was baked interactively and one want to use Session flash messages, the required 'Session'-Component wasn't added to the $components-Array
  • Loading branch information
cyberbehoerde committed Feb 4, 2014
1 parent 2cd7212 commit 9670a5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Cake/Console/Command/Task/ControllerTask.php
Expand Up @@ -184,6 +184,10 @@ protected function _interactive() {
$wannaUseSession = $this->in(
__d('cake_console', "Would you like to use Session flash messages?"), array('y', 'n'), 'y'
);

if (strtolower($wannaUseSession) === 'y') {
array_push($components, 'Session');
}
}
} else {
list($wannaBakeCrud, $wannaBakeAdminCrud) = $this->_askAboutMethods();
Expand Down

0 comments on commit 9670a5a

Please sign in to comment.