<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,7 +31,7 @@ INSTALL:
         gem update --system
         gem update rails
 
-    Install a few required gems: tzinfo, tztime, rspec
+    Install a few required gems: tzinfo, tztime, rspec  -- tzinfo and tztime may not be needed with rails 2.1
     Create config/database.yml; if you don't know how to do this, then you probably won't learn anything from this app.
     Import the database with rake db:migrate
     </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -5,8 +5,6 @@ class ApplicationController &lt; ActionController::Base
   include AuthenticatedSystem
   include ExceptionNotifiable
 
-  before_filter :set_user_time_zone
-  
   class AccessDenied &lt; StandardError; end
 
   # Pick a unique cookie name to distinguish our session data from others'
@@ -15,7 +13,7 @@ class ApplicationController &lt; ActionController::Base
   # If you want timezones per-user, uncomment this:
   before_filter :login_required
 
-  around_filter :set_user_time_zone
+  before_filter :set_timezone
   around_filter :catch_errors
   
   protected
@@ -25,10 +23,8 @@ class ApplicationController &lt; ActionController::Base
 
   private
 
-    def set_user_time_zone
-      Time.zone = logged_in? ? current_user.time_zone : TimeZone.new('Etc/UTC')
-        yield
-      Time.reset!
+    def set_timezone
+      Time.zone = current_user.time_zone if logged_in?
     end
 
     def catch_errors</diff>
      <filename>app/controllers/application.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,8 @@
 module ApplicationHelper
   
-  # Show the local time
-  def tz(time_at)
-    TzTime.zone.utc_to_local(time_at.utc)
-  end
+  # Show the local time  == outdated with rails 2.1
+  ##def tz(time_at)
+    ##TzTime.zone.utc_to_local(time_at.utc)
+  ##end
   
 end</diff>
      <filename>app/helpers/application_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,7 +22,7 @@ class User &lt; ActiveRecord::Base
   include AuthenticatedBase
   has_many :assets, :as =&gt; :attachable
 
-  composed_of :tz, :class_name =&gt; 'TZInfo::Timezone', :mapping =&gt; %w( time_zone time_zone )  ## in rails 2.1 this will be updated.
+  ## outdated with rails 2.1 composed_of :tz, :class_name =&gt; 'TZInfo::Timezone', :mapping =&gt; %w( time_zone time_zone )  ## in rails 2.1 this will be updated.
 
   validates_uniqueness_of :login, :email, :case_sensitive =&gt; false
 </diff>
      <filename>app/models/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,4 +12,5 @@
     &lt;%= form.password_field :password_confirmation %&gt;&lt;/p&gt;
 
     &lt;p&gt;&lt;label for=&quot;user_time_zone&quot;&gt;Default timezone&lt;/label&gt;
-    &lt;%= form.time_zone_select :time_zone, TimeZone.us_zones %&gt;&lt;/p&gt;
+    &lt;%= form.time_zone_select :time_zone, TimeZone.us_zones %&gt;
+	&lt;/p&gt;</diff>
      <filename>app/views/users/_form.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -33,6 +33,8 @@ Rails::Initializer.run do |config|
     :session_key =&gt; '_restful_auth_rspec_session',
     :secret      =&gt; '62a9f27912d6522beff9f364438209e0'
   }
+  # config/environment.rb -- turn on time zone default
+  config.time_zone = 'Pacific Time (US &amp; Canada)'
 
   # Use the database for sessions instead of the cookie-based default,
   # which shouldn't be used to store highly confidential information</diff>
      <filename>config/environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,8 +11,6 @@ config.whiny_nils = true
 # Show full error reports and disable caching
 config.action_controller.consider_all_requests_local = true
 config.action_controller.perform_caching             = false
-config.action_view.cache_template_extensions         = false
-config.action_view.debug_rjs                         = true
 
 # Don't care if the mailer can't send
 config.action_mailer.raise_delivery_errors = false</diff>
      <filename>config/environments/development.rb</filename>
    </modified>
    <modified>
      <diff>@@ -196,7 +196,7 @@ describe &quot;Requesting /users/1/edit using GET&quot; do
   controller_name :users
 
   before(:each) do
-    @user = mock_model(User, :tz =&gt; nil)
+    ## outdated with rails 2.1 @user = mock_model(User, :tz =&gt; nil)
     User.stub!(:find_by_param).and_return(@user)
     controller.stub!(:current_user).and_return @user
   end
@@ -259,7 +259,7 @@ describe &quot;Requesting /users/1 using PUT&quot; do
   controller_name :users
 
   before(:each) do
-    @user = mock_model(User, :to_param =&gt; &quot;1&quot;, :update_attributes =&gt; true, :tz =&gt; nil)
+    ## outdate with rails 2.1 ## @user = mock_model(User, :to_param =&gt; &quot;1&quot;, :update_attributes =&gt; true, :tz =&gt; nil)
     User.stub!(:find_by_param).and_return(@user)
     
     controller.stub!(:current_user).and_return(@user)
@@ -296,7 +296,7 @@ describe &quot;Requesting /users/1 using DELETE&quot; do
   controller_name :users
 
   before(:each) do
-    @user = mock_model(User, :destroy =&gt; true, :tz =&gt; nil)
+    ## outdate with rails 2.1 ## @user = mock_model(User, :destroy =&gt; true, :tz =&gt; nil)
     User.stub!(:find_by_param).and_return(@user)
     controller.stub!(:current_user).and_return @user
   end</diff>
      <filename>spec/controllers/users_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 ENV[&quot;RAILS_ENV&quot;] = &quot;test&quot;
 require File.expand_path(File.dirname(__FILE__) + &quot;/../config/environment&quot;)
 require 'spec/rails'
-require 'tzinfo'
+## outdate with rails 2.1 ## require 'tzinfo'
 
 require 'rspec_extensions' # custom in lib/
 
@@ -28,7 +28,7 @@ Spec::Runner.configure do |config|
   def mock_user
     user = mock_model(User, 
       :id =&gt; 1, 
-      :tz =&gt; TimeZone.new('USA/PDT'),
+      ## outdate with rails 2.1 ## :tz =&gt; TimeZone.new('USA/PDT'),
       :login =&gt; 'flappy',
       :email =&gt; 'flappy@email.com',
       :password =&gt; '', :password_confirmation =&gt; '',</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -133,7 +133,7 @@ namespace :peepcode do
     desc &quot;Install gems needed by PeepCode&quot;
     task :special_gems do
       # TODO hpricot
-      %w(libxml-ruby gruff sparklines ar_mailer bong production_log_analyzer tzinfo rspec).each do |gemname|
+      %w(libxml-ruby gruff sparklines ar_mailer bong production_log_analyzer rspec).each do |gemname|
         sudo &quot;gem install #{gemname} -y&quot;
       end
     end</diff>
      <filename>vendor/plugins/peepserver/recipes/peepserver.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>vendor/plugins/tzinfo_timezone/README</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/tzinfo_timezone/Rakefile</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/tzinfo_timezone/init.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/tzinfo_timezone/lib/tzinfo_timezone.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/tzinfo_timezone/test/tzinfo_timezone_test.rb</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/tztime/README</filename>
    </removed>
    <removed>
      <filename>vendor/plugins/tztime/lib/tz_time.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>e2d25dc99528485efda41d2a7398bd3c8da5ada1</id>
    </parent>
  </parents>
  <author>
    <name>Carl Tanner</name>
    <email>captproton@betterbilling.net</email>
  </author>
  <url>http://github.com/captproton/caboo.se-sample-app-v3/commit/c71e4811826a8fcf304542b01a8e477e5b051382</url>
  <id>c71e4811826a8fcf304542b01a8e477e5b051382</id>
  <committed-date>2008-06-06T14:24:52-07:00</committed-date>
  <authored-date>2008-06-06T14:24:52-07:00</authored-date>
  <message>Removed deprciated code:  WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files.  See http://www.rubyonrails.org/deprecation for details. (called from send at /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:455)</message>
  <tree>d7d01d3c7be7ae53b92e42cbd2e0c56855fb291b</tree>
  <committer>
    <name>Carl Tanner</name>
    <email>captproton@betterbilling.net</email>
  </committer>
</commit>
