<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitignore</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,7 +2,7 @@ CommaParser
 ===========
 
 This plugin allows you to accept commas from users for integer fields in 
-an ActiveRecord model. 
+an ActiveRecord model. It requires Rails 2.1 or higher.
 
 
 Example</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,12 @@
 module CommaParser
   
-  module SingletonMethods
+  module ParserMethods
     def allow_commas(*args)
       before_validation :strip_commas
       
       type_cast_array = []
       args.each do |arg|
+        type_cast_array &lt;&lt; &quot;#{arg}_will_change!&quot; 
         type_cast_array &lt;&lt; &quot;#{arg}_before_type_cast.to_s.tr!(',', '').to_i&quot;
       end
       
@@ -20,4 +21,4 @@ module CommaParser
   end
 end
 
-ActiveRecord::Base.extend CommaParser::SingletonMethods
+ActiveRecord::Base.extend CommaParser::ParserMethods</diff>
      <filename>lib/comma_parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,21 +15,30 @@ class CommaParserTest &lt; Test::Unit::TestCase
     @country.population = &quot;1,000,000&quot;
     @country.gross_domestic_product = &quot;5,000,000&quot;
     @country.save
-    assert_equal 1000000, @country.population
-    assert_equal 5000000, @country.gross_domestic_product
+    @country.reload
+    assert_equal 1_000_000, @country.population
+    assert_equal 5_000_000, @country.gross_domestic_product
   end
   
   def test_numbers_are_still_saved_correctly
-    @country.population = 1000000
-    @country.gross_domestic_product = 5000000
+    @country.population = 2_000_000
+    @country.gross_domestic_product = 10_000_000
     @country.save
-    assert_equal 1000000, @country.population
-    assert_equal 5000000, @country.gross_domestic_product
+    @country.reload
+    assert_equal 2_000_000, @country.population
+    assert_equal 10_000_000, @country.gross_domestic_product
+    @person.year_end_bonus = &quot;500&quot;
+    @person.save
+    @person.reload
+    assert_equal 500, @person.year_end_bonus
   end
   
   def test_commas_are_not_parsed_without_allow_commas
     @person.annual_income = &quot;50,000&quot;
+    @person.year_end_bonus = &quot;1,000&quot;
     @person.save
+    @person.reload
     assert_equal 50, @person.annual_income
+    assert_equal 1, @person.year_end_bonus
   end
 end</diff>
      <filename>test/comma_parser_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@ ActiveRecord::Schema.define :version =&gt; 0 do
     t.column :first_name, :string, :limit =&gt; 25
     t.column :last_name, :string, :limit =&gt; 25
     t.column :annual_income, :integer
+    t.column :year_end_bonus, :integer
     t.column :created_at, :datetime
     t.column :updated_at, :datetime
   end</diff>
      <filename>test/schema.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>test/debug.log</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>821a17215228ab6f9c8397e006a354bfeb514e7b</id>
    </parent>
  </parents>
  <author>
    <name>Doug Ramsay</name>
    <email>doug@intridea.com</email>
  </author>
  <url>http://github.com/dramsay/comma_parser/commit/5ecfd656b88aed47fea3bcee233fe76cb555904e</url>
  <id>5ecfd656b88aed47fea3bcee233fe76cb555904e</id>
  <committed-date>2008-10-06T13:17:08-07:00</committed-date>
  <authored-date>2008-10-06T13:17:08-07:00</authored-date>
  <message>Forcing Rails to recognize that attribute has been changed - otherwise in Rails 2.1 it won't be sent to database</message>
  <tree>cfdfca17e318b228e43d67644d24fcd63111548f</tree>
  <committer>
    <name>Doug Ramsay</name>
    <email>doug@intridea.com</email>
  </committer>
</commit>
