<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>vendor/plugins/will_paginate/LICENSE</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/README</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/Rakefile</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/init.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/lib/will_paginate.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/lib/will_paginate/collection.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/lib/will_paginate/finder.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/array_pagination_test.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/boot.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/console</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/finder_test.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/admin.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/developer.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/developers_projects.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/project.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/projects.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/replies.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/reply.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/schema.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/topic.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/topics.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/user.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/fixtures/users.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/lib/activerecord_test_case.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/lib/activerecord_test_connector.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/lib/load_fixtures.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/will_paginate/test/pagination_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -17,7 +17,7 @@ class Admin::OrdersController &lt; ApplicationController
                                        licensee_name ~* '%#{q}.*' OR
                                        id ~* '#{q}')&quot;
     end
-    @order_pages, @orders = paginate :orders, :per_page =&gt; 100, :conditions =&gt; conditions, :order =&gt; 'order_time DESC'
+    @orders = Order.paginate :page =&gt; (params[:page] || 1), :per_page =&gt; 100, :conditions =&gt; conditions, :order =&gt; 'order_time DESC'
 
     respond_to do |format|
       format.html # index.rhtml
@@ -110,14 +110,14 @@ class Admin::OrdersController &lt; ApplicationController
   def cancel
     @order = Order.find(params[:id])
     @order.status = 'X'
-    @order.update()
+    @order.save
     redirect_to :action =&gt; 'show', :id =&gt; @order.id
   end
 
   def uncancel
     @order = Order.find(params[:id])
     @order.status = 'C'
-    @order.update()
+    @order.save
     redirect_to :action =&gt; 'show', :id =&gt; @order.id
   end
 
@@ -146,7 +146,7 @@ class Admin::OrdersController &lt; ApplicationController
         end
         return true
       end
-    rescue
+    rescue Exception =&gt; e
       return false
     end
   end</diff>
      <filename>app/controllers/admin/orders_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -49,37 +49,37 @@ class AdminController &lt; ApplicationController
   def revenue_summary_amount
     revenue_summary()
     @type = &quot;amount&quot;
-    render_partial &quot;revenue_summary&quot;
+    render :partial =&gt;  &quot;revenue_summary&quot;
   end
 
   def revenue_summary_quantity
     revenue_summary()
     @type = &quot;quantity&quot;
-    render_partial &quot;revenue_summary&quot;
+    render :partial =&gt;  &quot;revenue_summary&quot;
   end
 
   def revenue_summary_percentage
     revenue_summary()
     @type = &quot;percentage&quot;
-    render_partial &quot;revenue_summary&quot;
+    render :partial =&gt;  &quot;revenue_summary&quot;
   end
 
   def revenue_history_days
     @type = &quot;30 Day&quot;
     @chart = OpenFlashChart.swf_object(500, 170, '/admin/charts/revenue_history_days')
-    render_partial &quot;revenue_history&quot;
+    render :partial =&gt;  &quot;revenue_history&quot;
   end
 
   def revenue_history_weeks
     @type = &quot;26 Week&quot;
     @chart = OpenFlashChart.swf_object(500, 170, '/admin/charts/revenue_history_weeks')
-    render_partial &quot;revenue_history&quot;
+    render :partial =&gt;  &quot;revenue_history&quot;
   end
 
   def revenue_history_months
     @type = &quot;12 Month&quot;
     @chart = OpenFlashChart.swf_object(500, 170, '/admin/charts/revenue_history_months')
-    render_partial &quot;revenue_history&quot;
+    render :partial =&gt;  &quot;revenue_history&quot;
   end
   
   # Coupon actions
@@ -218,7 +218,7 @@ class AdminController &lt; ApplicationController
         @product_revenue[name] &lt;&lt; row[&quot;revenue&quot;]
         @product_quantity[name] &lt;&lt; row[&quot;quantity&quot;]
         orders = row[&quot;orders&quot;]
-        total += row[&quot;revenue&quot;]
+        total = total.to_f + row[&quot;revenue&quot;].to_f
       end
       @num_orders &lt;&lt; orders
       @revenue &lt;&lt; total
@@ -232,7 +232,7 @@ class AdminController &lt; ApplicationController
         if @revenue[i].to_f == 0
           @product_percentage[product] &lt;&lt; 0
         else
-          @product_percentage[product] &lt;&lt; @product_revenue[product][i] / @revenue[i].to_f * 100
+          @product_percentage[product] &lt;&lt; @product_revenue[product][i].to_f / @revenue[i].to_f * 100.0
         end
       end
     end
@@ -255,7 +255,7 @@ class AdminController &lt; ApplicationController
     @month_estimate = 0
     @year_estimate = 0
 
-    daily_avg = last_n_days_revenue(90) / 90.0
+    daily_avg = last_n_days_revenue(90).to_f / 90.0
 
     # Calculate a very simple sales projection.
     # Takes the average daily sales from the last 90 days to extrapolate the sales
@@ -264,7 +264,7 @@ class AdminController &lt; ApplicationController
     days_in_current_month = Date.civil(today.year, today.month, -1).day
     
     if result != nil and result.length &gt; 0
-      @month_estimate = last_n_days_revenue(today.day) + daily_avg * (days_in_current_month - today.day)
+      @month_estimate = last_n_days_revenue(today.day).to_f + daily_avg * (days_in_current_month - today.day)
       @year_estimate = daily_avg * 365
     end
   end</diff>
      <filename>app/controllers/admin_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,4 @@
+
 class Store::OrderController &lt; ApplicationController
   layout &quot;store&quot;
 
@@ -66,7 +67,6 @@ class Store::OrderController &lt; ApplicationController
 
     # Handle Paypal orders
     if params[:payment_type] == 'paypal'
-
       res =  Paypal.express_checkout(:amount =&gt; String(@order.total),
                                      :cancelURL =&gt; url_for(:action =&gt; 'index'),
                                      :returnURL =&gt; url_for(:action =&gt; 'confirm_paypal'),</diff>
      <filename>app/controllers/store/order_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,2 @@
-module ChartsHelper
+module Admin::ChartsHelper
 end</diff>
      <filename>app/helpers/admin/charts_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,2 @@
-module OrdersHelper
+module Admin::OrdersHelper
 end</diff>
      <filename>app/helpers/admin/orders_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,2 @@
-module ProductsHelper
+module Admin::ProductsHelper
 end</diff>
      <filename>app/helpers/admin/products_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@ class Order &lt; ActiveRecord::Base
   attr_accessor :paypal_token, :paypal_payer_id
   attr_accessor :skip_cc_validation
   attr_writer :promo_coupons
-
+  
   validates_presence_of :payment_type
 
   def validate
@@ -49,7 +49,7 @@ class Order &lt; ActiveRecord::Base
       errors.add('licensee_name', msg= 'must be at least 8 characters long')
     end
   end
-
+  
   def total
     return round_money(total_before_applying_coupons() - coupon_amount())
   end
@@ -249,7 +249,7 @@ class Order &lt; ActiveRecord::Base
           self.line_items.delete(litem)
         else
           litem.quantity = quantity
-          litem.update
+          litem.save if !litem.new_record?
         end
       end
     end
@@ -262,7 +262,7 @@ class Order &lt; ActiveRecord::Base
       litem = self.line_item_with_product_id(product_id)
       next if litem == nil
       litem.unit_price = item_prices[product_id]
-      litem.update
+      litem.save if !litem.new_record?
     end
   end
 
@@ -325,13 +325,15 @@ class Order &lt; ActiveRecord::Base
     # The following is needed because MediaTemple puts in two ip addresses in the REMOTE_ADDR for some reason
     ip_address = request.env['REMOTE_ADDR']
     ip_address = ip_address.split(',')[0] if ip_address.count(&quot;,&quot;) != 0
-
+    ip_address = &quot;127.0.0.1&quot; if ip_address == &quot;::1&quot;
+    
     cc_year = self.cc_year.to_s
     if cc_year.length == 2
       cc_year = '20' + cc_year
     elsif cc_year.length == 1
       cc_year = '200' + cc_year
     end
+    
     res = Paypal.directcharge(:firstName =&gt; self.first_name,
                               :lastName =&gt; self.last_name,
                               :ip =&gt; ip_address,</diff>
      <filename>app/models/order.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,7 +22,7 @@ table tr td { padding-right:10px; }
 	&lt;/div&gt;
 	&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
 	&lt;div id=&quot;rsummary&quot;&gt;
-		&lt;%= render_partial &quot;revenue_summary&quot; %&gt;
+		&lt;%= render :partial =&gt;  &quot;revenue_summary&quot; %&gt;
 	&lt;/div&gt;
 &lt;/div&gt;
 
@@ -35,6 +35,6 @@ table tr td { padding-right:10px; }
 	&lt;/div&gt;
 	&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
 	&lt;div id=&quot;rhistory&quot;&gt;
-		&lt;%= render_partial &quot;revenue_history&quot; %&gt;
+		&lt;%= render :partial =&gt;  &quot;revenue_history&quot; %&gt;
     &lt;/div&gt;
 &lt;/div&gt;</diff>
      <filename>app/views/admin/index.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-&lt;% if @order -%&gt;
+&lt;% if @order &amp;&amp; !@order.new_record? -%&gt;
 &lt;%= form.hidden_field :id %&gt;
 &lt;%= form.hidden_field :status %&gt;
 &lt;% end -%&gt;</diff>
      <filename>app/views/admin/orders/_form.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,7 @@
 &lt;h1&gt;Orders&lt;/h1&gt;
 
 &lt;div class=&quot;pagination&quot;&gt;
-    &lt;%= link_to 'Prev', { :page =&gt; @order_pages.current.previous, :params =&gt; params } if @order_pages.current.previous %&gt;
-    &lt;%= pagination_links(@order_pages, {:params =&gt; params}) %&gt;
-    &lt;%= link_to 'Next', { :page =&gt; @order_pages.current.next, :params =&gt; params } if @order_pages.current.next %&gt;
+    &lt;%= will_paginate @orders %&gt;
 &lt;/div&gt;
 
 &lt;table id=&quot;orders&quot; class=&quot;list&quot;&gt;
@@ -45,9 +43,7 @@
 &lt;/table&gt;
 
 &lt;div class=&quot;pagination&quot;&gt;
-    &lt;%= link_to 'Prev', { :page =&gt; @order_pages.current.previous, :params =&gt; params } if @order_pages.current.previous %&gt;
-    &lt;%= pagination_links(@order_pages, {:params =&gt; params}) %&gt;
-    &lt;%= link_to 'Next', { :page =&gt; @order_pages.current.next, :params =&gt; params } if @order_pages.current.next %&gt;
+    &lt;%= will_paginate @orders %&gt;
 &lt;/div&gt;
 
 &lt;br /&gt;</diff>
      <filename>app/views/admin/orders/index.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -58,7 +58,7 @@
 	&lt;p&gt;- &lt;%=$STORE_PREFS['company_name']%&gt;&lt;/p&gt;
   
 	&lt;div class=&quot;d&quot;&gt;&lt;/div&gt;
-	&lt;%= render :partial =&gt; '../store/order/receipt', :order =&gt; @order %&gt;
+	&lt;%= render :partial =&gt; '/store/order/receipt', :order =&gt; @order %&gt;
 
 	&lt;% if coupons &amp;&amp; coupons.length &gt; 0 -%&gt;
 	&lt;div class=&quot;d&quot;&gt;&lt;/div&gt;</diff>
      <filename>app/views/order_mailer/thankyou_html.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -27,6 +27,9 @@ Rails::Initializer.run do |config|
   # Use the database for sessions instead of the file system
   # (create the session table with 'rake db:sessions:create')
   # config.action_controller.session_store = :active_record_store
+  
+  # If wanting Rails 2 with cookie store:
+  config.action_controller.session = { :session_key =&gt; &quot;_roobasoft_store_session&quot;, :secret =&gt; &quot;u'@R4@ck{Ikwjhum}&amp;QHoJ,{cvrlyOZ11&quot; }
 
   # Use SQL instead of Active Record's schema dumper when creating the test database.
   # This is necessary if your schema can't be completely dumped by the schema dumper, 
@@ -40,6 +43,10 @@ Rails::Initializer.run do |config|
   # config.active_record.default_timezone = :utc
   
   # See Rails::Configuration for more options
+  
+  config.load_paths += Dir[&quot;#{RAILS_ROOT}/vendor/gems/**&quot;].map do |dir| 
+    File.directory?(lib = &quot;#{dir}/lib&quot;) ? lib : dir
+  end
 end
 
 # Add new inflection rules using the following format </diff>
      <filename>config/environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,9 +8,6 @@ config.cache_classes = false
 # Log error messages when you accidentally call methods on nil.
 config.whiny_nils = true
 
-# Enable the breakpoint server that script/breakpointer connects to
-config.breakpoint_server = true
-
 # Show full error reports and disable caching
 config.action_controller.consider_all_requests_local = true
 config.action_controller.perform_caching             = false</diff>
      <filename>config/environments/development.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,9 @@ google_analytics_account: &quot;&quot;
 include_mint: false
 paypal_express_checkout_header_image: &quot;https://www.mycompany.com/images/mylogo.png&quot;
 
+# Google checkout?
+allow_google_checkout: false
+
 # Email addresses
 support_email: &quot;support@mycompany.com&quot;
 sales_email: &quot;sales@mycompany.com&quot;</diff>
      <filename>config/store.yml</filename>
    </modified>
    <modified>
      <diff>@@ -95,9 +95,9 @@ class CreateTables &lt; ActiveRecord::Migration
   end
 
   def self.down
-    remove_foreign_key_constraint &quot;line_items&quot;, :foreign_key =&gt; &quot;order_id&quot;
-    remove_foreign_key_constraint &quot;line_items&quot;, :foreign_key =&gt; &quot;product_id&quot;
-    remove_foreign_key_constraint &quot;orders&quot;, :foreign_key =&gt; &quot;coupon_id&quot;
+    remove_foreign_key_constraint &quot;line_items&quot;, &quot;line_items_ibfk_order_id&quot;
+    remove_foreign_key_constraint &quot;line_items&quot;, &quot;line_items_ibfk_product_id&quot;
+    remove_foreign_key_constraint &quot;orders&quot;, &quot;orders_ibfk_coupon_id&quot;
     
     drop_table :list_subscribers
     drop_table :line_items</diff>
      <filename>db/migrate/001_create_tables.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,15 @@
 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
 first:
-  id: 1
-  order_id: 1
-  product_id: 1
+  order: first
+  product: first
   quantity: 1
   unit_price: 100
   license_key: &quot;AB-0000000001&quot;
+
+taxed:
+  order: taxed
+  product: first
+  quantity: 1
+  unit_price: 100
+  license_key: &quot;AB-0000000001&quot;
+</diff>
      <filename>test/fixtures/line_items.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,5 @@
 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
 first:
-  id: 1
   coupon_id:
   status: &quot;C&quot;
   email: &quot;test@test.com&quot;
@@ -20,4 +19,27 @@ first:
   comment: &quot;Don't call&quot; 
   failure_code: 0
   failure_reason: &quot;&quot;
-  transaction_number: &quot;012123AAAAJDHHDGUTQWQOOA1&quot;
\ No newline at end of file
+  transaction_number: &quot;012123AAAAJDHHDGUTQWQOOA1&quot;
+
+taxed:
+  coupon_id:
+  status: &quot;C&quot;
+  email: &quot;test@test.com&quot;
+  order_time: &quot;2007-07-01 12:00:00+08:00&quot;
+  first_name: &quot;Princess&quot;
+  licensee_name: &quot;Barf the Mog&quot;
+  last_name: &quot;Vespa&quot;
+  company: &quot;Druid Royal Family&quot;
+  address1: &quot;c/o Dot Matrix&quot;
+  address2: &quot;1 Royal Palace&quot;
+  city: &quot;Druidia City&quot;
+  state: &quot;CA&quot;
+  zipcode: &quot;90035&quot;
+  country:  &quot;US&quot;
+  payment_type: &quot;Visa&quot;
+  ccnum: &quot;XXXXXXXXXXXXXXXX3456&quot;
+  comment: &quot;Don't call&quot; 
+  failure_code: 0
+  failure_reason: &quot;&quot;
+  transaction_number: &quot;012124AAAAJDHHDGUTQWQOOA1&quot;
+  
\ No newline at end of file</diff>
      <filename>test/fixtures/orders.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,5 @@
 # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
 first:
-  id: 1
   code: &quot;TEST1&quot;
   name: &quot;Test product 1&quot;          
   price: 100             
@@ -10,7 +9,6 @@ first:
   license_url_scheme: &quot;x-test-product-fixture&quot;
   active: 1
 second:
-  id: 2
   code: &quot;TEST2&quot;
   name: &quot;Test product 2&quot;          
   price: 150  </diff>
      <filename>test/fixtures/products.yml</filename>
    </modified>
    <modified>
      <diff>@@ -50,7 +50,7 @@ class AdminProductsControllerTest &lt; Test::Unit::TestCase
   def test_should_create_product
     num_products = Product.count
 
-    post :create, {:product =&gt; {}}, {:logged_in =&gt; true}
+    post :create, {:product =&gt; {:code =&gt; &quot;product_new_1&quot;, :name =&gt; &quot;New Product v1&quot;}}, {:logged_in =&gt; true}
 
     assert_response :redirect
     assert_redirected_to :controller =&gt; 'admin/products' , :action =&gt; 'show'
@@ -79,6 +79,8 @@ class AdminProductsControllerTest &lt; Test::Unit::TestCase
       Product.find(@first_id)
     }
 
+    LineItem.destroy_all
+    
     post :destroy, {:id =&gt; @first_id}, {:logged_in =&gt; true}
     assert_response :redirect
     assert_redirected_to :controller =&gt; 'admin/products', :action =&gt; 'index'</diff>
      <filename>test/functional/admin_products_controller_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ class OrderMailerTest &lt; Test::Unit::TestCase
   FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures'
   CHARSET = &quot;utf-8&quot;
   
-  fixtures :orders
+  fixtures :orders, :products, :line_items
   include ActionMailer::Quoting
 
   def setup</diff>
      <filename>test/unit/order_mailer_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,10 @@
 require File.dirname(__FILE__) + '/../test_helper'
 
 class OrderTest &lt; Test::Unit::TestCase
-  fixtures :orders
+  fixtures :orders, :line_items, :products
   
   def setup
-    @order = Order.find(1)
+    @order = orders(:first)
   end
   
   def test_status_description</diff>
      <filename>test/unit/order_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -37,18 +37,8 @@ module ActiveRecord
     
     class PostgreSQLAdapter &lt; AbstractAdapter
       def foreign_key_constraints(table, name = nil)
-        # sql =  &quot;SELECT conname, pg_catalog.pg_get_constraintdef(oid) AS consrc FROM pg_catalog.pg_constraint WHERE contype='f' &quot;
-        #sql += &quot;AND conrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='#{table}')&quot;
-
-        # Modified to the following 2 lines from the advice of
-        # http://wiki.rubyonrails.org/rails/pages/Foreign+Key+Schema+Dumper+Plugin
-        
-        sql =  &quot;SELECT f.conname, pg_get_constraintdef(f.oid) AS consrc FROM pg_class t, pg_constraint f &quot; 
-        sql += &quot;WHERE f.conrelid = t.oid AND f.contype = 'f' AND t.relname = '#{table}'&quot;         
-        
-        # NOTE: There is also discussion in the mentioned link about code supporting more
-        #       postgres foreign relationships
-        # -AK
+        sql =  &quot;SELECT conname, pg_catalog.pg_get_constraintdef(oid) AS consrc FROM pg_catalog.pg_constraint WHERE contype='f' &quot;
+        sql += &quot;AND conrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='#{table}')&quot;
         
         query(sql,name).collect do |row| 
           if row[1] =~ /FOREIGN KEY \((.+)\) REFERENCES (.+)\((.+)\)(?: ON UPDATE (\w+))?(?: ON DELETE (\w+))?/
@@ -63,10 +53,11 @@ module ActiveRecord
         execute &quot;ALTER TABLE #{table_name} DROP CONSTRAINT #{constraint_name}&quot;
       end
       
-      alias old_default_value default_value
+      # Fails with no menthod 'default_value' in rails2
+      # alias old_default_value default_value
       def default_value(value)
         return &quot;:now&quot; if value =~ /^now\(\)|^\('now'::text\)::(date|timestamp)/i
-        return old_default_value(value) 
+        #return old_default_value(value) 
       end
     end
     
@@ -165,9 +156,9 @@ module ActiveRecord
         constraint_name = options[:name] || &quot;#{table_name}_ibfk_#{foreign_key}&quot;
 
         # oracle chokes on constraints longer than 30 chars
-        if adapter_name =~ /^(oci|oracle)$/i
-          constraint_name = 'c'+Digest::SHA1.hexdigest(constraint_name)[0,29]
-        end
+	if adapter_name =~ /^(oci|oracle)$/i
+	  constraint_name = 'c'+Digest::SHA1.hexdigest(constraint_name)[0,29]
+	end
         
         sql = &quot;ALTER TABLE #{table_name} ADD CONSTRAINT #{constraint_name} FOREIGN KEY (#{foreign_key}) REFERENCES #{reference_table} (#{reference_column})&quot;
     </diff>
      <filename>vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>240619099a4c3e130128b0d4e9f808b24fad0c56</id>
    </parent>
  </parents>
  <author>
    <name>Andy Kim</name>
    <email>andy@potionfactory.com</email>
  </author>
  <url>http://github.com/potionfactory/potionstore/commit/18615d796daf694874b6d42baaeecc1fb9ea5aa9</url>
  <id>18615d796daf694874b6d42baaeecc1fb9ea5aa9</id>
  <committed-date>2008-01-09T02:25:44-08:00</committed-date>
  <authored-date>2008-01-09T02:25:44-08:00</authored-date>
  <message>Brian's Rails 2 patch applied</message>
  <tree>58d422e7d771e9ed2421ca3acc9ee2340d5025f7</tree>
  <committer>
    <name>Andy Kim</name>
    <email>andy@potionfactory.com</email>
  </committer>
</commit>
