Revert "start work on single conroller"
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Tutorial / 05_Authentication.pod
index dc6e2bd..5c727c2 100644 (file)
@@ -223,11 +223,11 @@ C<StackTrace> is new):
         -Debug
         ConfigLoader
         Static::Simple
-
+    
         StackTrace
-
+    
         Authentication
-
+    
         Session
         Session::Store::FastMmap
         Session::State::Cookie
@@ -370,15 +370,15 @@ and update the definition of C<sub index> to match:
                 return;
             } else {
                 # Set an error message
-                $c->stash->{error_msg} = "Bad username or password.";
+                $c->stash(error_msg => "Bad username or password.");
             }
         } else {
             # Set an error message
-            $c->stash->{error_msg} = "Empty username or password.";
+            $c->stash(error_msg => "Empty username or password.");
         }
     
         # If either of above don't work out, send to the login page
-        $c->stash->{template} = 'login.tt2';
+        $c->stash(template => 'login.tt2');
     }
 
 Be sure to remove the 
@@ -585,6 +585,7 @@ box instead of using NTP.
 Open C<root/src/books/list.tt2> and add the following lines to the
 bottom (below the closing </table> tag):
 
+    ...
     <p>
       <a href="[% c.uri_for('/login') %]">Login</a>
       <a href="[% c.uri_for(c.controller.action_for('form_create')) %]">Create</a>
@@ -649,8 +650,6 @@ the closing "1;":
     # with hex encoding; Generate the 'check_password" method
     __PACKAGE__->add_columns(
         'password' => {
-            data_type           => "TEXT",
-            size                => undef,
             encode_column       => 1,
             encode_class        => 'Digest',
             encode_args         => {salt_length => 10},