<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,6 +2,7 @@
 
 Provides automatic session timeout in a Rails application.
 
+
 == Installation
 
 Install the gem directly:
@@ -16,6 +17,7 @@ Or clone the project:
 
   git clone git://github.com/pelargir/auto-session-timeout.git
 
+
 == Usage
 
 After installing, tell your application controller to use auto timeout:
@@ -27,7 +29,9 @@ After installing, tell your application controller to use auto timeout:
 
 You will also need to insert this line inside the &lt;body&gt;&lt;/body&gt; tags in
 your views. The easiest way to do this is to insert it once inside your
-default or application-wide layout:
+default or application-wide layout. Make sure you are only rendering
+it if the user is logged in, otherwise the plugin will attempt to force
+non-existent sessions to timeout, wreaking havoc:
 
   &lt;html&gt;
     &lt;head&gt;...&lt;/head&gt;
@@ -40,9 +44,19 @@ default or application-wide layout:
   &lt;/html&gt;
 
 You need to setup two actions: one to return the session status and
-another that runs when the session times out. Define both actions in a
-controller (the best choice is probably your user or session controller).
-The actions should look like this:
+another that runs when the session times out. You can use the default
+actions included with the plugin by inserting this line in your target
+controller (most likely your user or session controller):
+
+class SessionsController &lt; ApplicationController
+  auto_session_timeout_actions
+  ...
+end
+
+To customize the default actions, simply override them. You can call
+the render_session_status and render_session_timeout methods to use
+the default implementation from the plugin, or you can define the
+actions entirely with your own custom code:
 
   class SessionsController &lt; ApplicationController
     def active
@@ -55,16 +69,32 @@ The actions should look like this:
     ...
   end
 
-You can customize the actions as you see fit, even going so far as to
-remove the render calls if you want something different to occur.
-
-Make sure to properly map the actions in your routes.rb file:
+In any of these cases, make sure to properly map the actions in
+your routes.rb file:
 
   map.active '/active', :controller =&gt; 'sessions', :action =&gt; 'active'
   map.timeout '/timeout', :controller =&gt; 'sessions', :action =&gt; 'timeout'
 
-You're done! By default, sessions auto timeout after 60 minutes of inactivity.
-This value will be configurable in future versions of the plugin.
+You're done! Enjoy watching your sessions automatically timeout.
+
+
+== Additional Configuration
+
+By default, the JavaScript code checks the server every 60 seconds for
+active sessions. If you prefer that it check more frequently, pass a
+frequency attribute to the helper method. The frequency is given in
+seconds. The following example checks the server every 15 seconds:
+
+  &lt;html&gt;
+    &lt;head&gt;...&lt;/head&gt;
+    &lt;body&gt;
+      &lt;% if logged_in? -%&gt;
+        &lt;%= auto_session_timeout_js :frequency =&gt; 15 %&gt;
+      &lt;% end -%&gt;
+      ...
+    &lt;/body&gt;
+  &lt;/html&gt;
+
 
 == Resources
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -17,6 +17,11 @@ module AutoSessionTimeout
         end
       end
     end
+    
+    def auto_session_timeout_actions
+      define_method(:active) { render_session_status }
+      define_method(:timeout) { render_session_timeout }
+    end
   end
   
   def render_session_status</diff>
      <filename>lib/auto_session_timeout.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4fe45d6426f95e0e9d4657e0faa3ce5c562d7f65</id>
    </parent>
  </parents>
  <author>
    <name>Matthew Bass</name>
    <email>pelargir@anacreon.local</email>
  </author>
  <url>http://github.com/pelargir/auto-session-timeout/commit/e850aaa3e671132a5ca67e9173cbb7524b2d13fc</url>
  <id>e850aaa3e671132a5ca67e9173cbb7524b2d13fc</id>
  <committed-date>2009-06-03T16:57:53-07:00</committed-date>
  <authored-date>2009-06-03T16:57:53-07:00</authored-date>
  <message>moved actions into plugin</message>
  <tree>dac90829b41a7383c3311fde39c99b018b20affa</tree>
  <committer>
    <name>Matthew Bass</name>
    <email>pelargir@anacreon.local</email>
  </committer>
</commit>
