<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -29,12 +29,26 @@ module Learning::RequestWrapper
     @google_ad_slot    = Learning::GOOGLE_AD_SLOT
     @google_analytics  = Learning::GOOGLE_ANALYTICS
     response = super(*a)
+  end
+end
+
+module Learning::CookieWrapper
+  def service(*a)
+    @cgi_cookies    = Camping::H.new
+    @default_cookie = Camping::H.new.merge({ :path =&gt; '/' })
+    response = super(*a)
+    @cgi_cookies.each do |name, settings|
+      c = @default_cookie.merge(settings);
+      c.name = name
+      cookie = CGI::Cookie.new(c);
+      headers['Set-Cookie'].push(cookie.to_s)
+    end
     response
   end
 end
 
 module Learning
-  include Camping::Session, Learning::RequestWrapper
+  include Camping::Session, Learning::RequestWrapper, Learning::CookieWrapper
 
   def self.create
     Camping::Models::Session.create_schema</diff>
      <filename>learning.rb</filename>
    </modified>
    <modified>
      <diff>@@ -139,6 +139,15 @@ module Learning::Controllers
           pair.save
         end
       end
+      @cgi_cookies[topic.word] = { 
+        :value   =&gt; topic.word,
+        :secure  =&gt; true
+      }
+      @cgi_cookies[teacher.word] = { 
+        :value   =&gt; teacher.word, 
+        :secure  =&gt; false,
+        :expires =&gt; Time.now + 4.years
+      }
       redirect R(Home)
     end
   end</diff>
      <filename>learning/controllers.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0785a11000c0e6be414b7205a9b9303114f5cbba</id>
    </parent>
  </parents>
  <author>
    <name>John Beppu</name>
    <email>beppu@work.(none)</email>
  </author>
  <url>http://github.com/beppu/learning/commit/c6559d42adaf8624d836ecb8b4f6bfaf53255e47</url>
  <id>c6559d42adaf8624d836ecb8b4f6bfaf53255e47</id>
  <committed-date>2008-05-18T04:30:40-07:00</committed-date>
  <authored-date>2008-05-18T04:30:40-07:00</authored-date>
  <message>Learning::CookieWrapper + Examples</message>
  <tree>c3e4bc0fd8c6e5ee1ab4582a03fdc8f5e4ecddc2</tree>
  <committer>
    <name>John Beppu</name>
    <email>beppu@work.(none)</email>
  </committer>
</commit>
