<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: session code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 07:02:18 GMT</pubDate>
    <description>DZone Snippets: session code</description>
    <item>
      <title>Persistent Rails cookie session</title>
      <link>http://snippets.dzone.com/posts/show/5173</link>
      <description>Session cookies, the Rails-2 kind, are transient because that's safer.  In some applications safety isn't important.  The following makes the session cookies persist for a year.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;class ApplicationController &lt; ActionController::Base&lt;br /&gt;  before_filter :update_session_expiration_date&lt;br /&gt;&lt;br /&gt;private&lt;br /&gt;  def update_session_expiration_date&lt;br /&gt;    unless ActionController::Base.session_options[:session_expires]&lt;br /&gt;      ActionController::Base.session_options[:session_expires] = 1.year.from_now&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 25 Feb 2008 12:23:27 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5173</guid>
      <author>remvee (Remco van 't Veer)</author>
    </item>
  </channel>
</rss>
