<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -301,23 +301,21 @@ module ActiveRecord #:nodoc:
         # Create the needed columns for acts_as_rated. 
         # To be used during migration, but can also be used in other places.
         def add_ratings_columns
-          if !self.content_columns.find { |c| 'rating_count' == c.name }
+          if !self.column_names.include? 'rating_count'
             self.connection.add_column table_name, :rating_count, :integer
             self.connection.add_column table_name, :rating_total, :decimal
             self.connection.add_column table_name, :rating_avg,   :decimal, :precision =&gt; 10, :scale =&gt; 2
             self.reset_column_information
-          end            
+          end
         end
 
         # Remove the acts_as_rated specific columns added with add_ratings_columns
         # To be used during migration, but can also be used in other places
         def remove_ratings_columns
-          if self.content_columns.find { |c| 'rating_count' == c.name }
-            self.connection.drop_column table_name, :rating_count
-            self.connection.drop_column table_name, :rating_total
-            self.connection.drop_column table_name, :rating_avg
+          if self.column_names.include? 'rating_count'
+            self.connection.remove_columns table_name, :rating_count, :rating_total, :rating_avg
             self.reset_column_information
-          end            
+          end
         end
 
         # Create the ratings table</diff>
      <filename>lib/acts_as_rated.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cfe7bd11f0f1919b332637c55d1f45f923cad6a9</id>
    </parent>
  </parents>
  <author>
    <name>Rich Sturim</name>
    <email>rich@sturim.org</email>
  </author>
  <url>http://github.com/jasherai/acts-as-rated/commit/755ee8b9f0e1ea1271e9e2979f0dc69114f5af1b</url>
  <id>755ee8b9f0e1ea1271e9e2979f0dc69114f5af1b</id>
  <committed-date>2009-01-08T06:14:59-08:00</committed-date>
  <authored-date>2009-01-07T09:05:47-08:00</authored-date>
  <message>Fixes migrations for adding and removing ratings columns

Signed-off-by: Pritesh &lt;pritesh@phatforge.com&gt;</message>
  <tree>089c6208c5fa0891a690e9e2b8e68fa579a0090e</tree>
  <committer>
    <name>Pritesh</name>
    <email>pritesh@phatforge.com</email>
  </committer>
</commit>
