<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,45 +1,44 @@
-require File.dirname(__FILE__) + '/follower_lib'
-
-module ActiveRecord #:nodoc:
-  module Acts #:nodoc:
-    module Followable
-      
-      def self.included(base)
-        base.extend ClassMethods
-        base.class_eval do
-          include FollowerLib
-        end
-      end
-      
-      module ClassMethods
-        def acts_as_followable
-          has_many :follows, :as =&gt; :followable, :dependent =&gt; :destroy
-          include ActiveRecord::Acts::Followable::InstanceMethods
-        end
-      end
-
-      
-      # This module contains instance methods
-      module InstanceMethods
-        
-        # Returns the number of followers a record has.
-        def followers_count
-          self.follows.size
-        end
-        
-        # Returns the following records.
-        def followers
-          Follow.find(:all, :include =&gt; [:follower], :conditions =&gt; [&quot;followable_id = ? AND followable_type = ?&quot;, 
-              self.id, parent_class_name(self)]).collect {|f| f.follower }
-        end
-        
-        # Returns true if the current instance is followed by the passed record.
-        def followed_by?(follower)
-          Follow.find(:first, :conditions =&gt; [&quot;followable_id = ? AND followable_type = ? AND follower_id = ? AND follower_type = ?&quot;, self.id, parent_class_name(self), follower.id, parent_class_name(follower)]) ? true : false
-        end
-        
-      end
-      
-    end
-  end
-end
+require File.dirname(__FILE__) + '/follower_lib'
+
+module ActiveRecord #:nodoc:
+  module Acts #:nodoc:
+    module Followable
+      
+      def self.included(base)
+        base.extend ClassMethods
+        base.class_eval do
+          include FollowerLib
+        end
+      end
+      
+      module ClassMethods
+        def acts_as_followable
+          has_many :follows, :as =&gt; :followable, :dependent =&gt; :destroy
+          include ActiveRecord::Acts::Followable::InstanceMethods
+        end
+      end
+
+      
+      module InstanceMethods
+        
+        # Returns the number of followers a record has.
+        def followers_count
+          self.follows.size
+        end
+        
+        # Returns the following records.
+        def followers
+          Follow.find(:all, :include =&gt; [:follower], :conditions =&gt; [&quot;followable_id = ? AND followable_type = ?&quot;, 
+              self.id, parent_class_name(self)]).collect {|f| f.follower }
+        end
+        
+        # Returns true if the current instance is followed by the passed record.
+        def followed_by?(follower)
+          Follow.find(:first, :conditions =&gt; [&quot;followable_id = ? AND followable_type = ? AND follower_id = ? AND follower_type = ?&quot;, self.id, parent_class_name(self), follower.id, parent_class_name(follower)]) ? true : false
+        end
+        
+      end
+      
+    end
+  end
+end</diff>
      <filename>lib/acts_as_followable.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,100 +1,96 @@
-require File.dirname(__FILE__) + '/follower_lib'
-
-module ActiveRecord #:nodoc:
-  module Acts #:nodoc:
-    module Follower
-      
-      def self.included(base)
-        base.extend ClassMethods
-        base.class_eval do
-          include FollowerLib
-        end
-      end
-      
-      module ClassMethods
-        def acts_as_follower
-          has_many :follows, :as =&gt; :follower, :dependent =&gt; :destroy
-          include ActiveRecord::Acts::Follower::InstanceMethods
-        end
-      end
-      
-      # This module contains instance methods
-      module InstanceMethods
-        
-        # Returns true if this instance is following the object passed as an argument.
-        def following?(followable)
-          0 &lt; Follow.count(:all, :conditions =&gt; [
-                &quot;follower_id = ? AND follower_type = ? AND followable_id = ? AND followable_type = ?&quot;,
-                 self.id, parent_class_name(self), followable.id, parent_class_name(followable)
-               ])
-        end
-        
-        # Returns the number of objects this instance is following.
-        def follow_count
-          Follow.count(:all, :conditions =&gt; [&quot;follower_id = ? AND follower_type = ?&quot;, self.id, parent_class_name(self)])
-        end
-        
-        # Creates a new follow record for this instance to follow the passed object.
-        # Does not allow duplicate records to be created.
-        def follow(followable)
-          follow = get_follow(followable)
-          unless follow
-            Follow.create(:followable =&gt; followable, :follower =&gt; self)
-          end
-        end
-        
-        # Deletes the follow record if it exists.
-        def stop_following(followable)
-          follow = get_follow(followable)
-          if follow
-            follow.destroy
-          end
-        end
-        
-        # TODO: Remove from public API.
-        # Returns the follow records related to this instance by type.
-        def follows_by_type(followable_type)
-          Follow.find(:all, :conditions =&gt; [&quot;follower_id = ? AND follower_type = ? AND followable_type = ?&quot;, self.id, parent_class_name(self), followable_type])
-        end
-        
-        # TODO: Remove from public API.
-        # Returns the follow records related to this instance by type.
-        def all_follows
-          Follow.find(:all, :include =&gt; [:followable], :conditions =&gt; [&quot;follower_id = ? AND follower_type = ?&quot;, self.id, parent_class_name(self)])
-        end
-        
-        # Returns the actual records which this instance is following.
-        def all_following
-          all_follows.map { |f| f.followable }
-        end
-        
-        # Returns the actual records of a particular type which this record is following.
-        def following_by_type(followable_type)
-          #klass = eval(followable_type) # be careful with this.
-          #klass.find(:all, :joins =&gt; :follows, :conditions =&gt; ['follower_id = ? AND follower_type = ?', self.id, parent_class_name(self)])
-          follows_by_type(followable_type).map { |f| f.followable }
-        end
-        
-        # Allows magic names on following_by_type
-        # e.g. following_users == following_by_type('User')
-        def method_missing(m, *args)
-          if m.to_s[/following_(.+)/]
-            #following_by_type(parent_class_name($1).classify)
-            following_by_type($1.singularize.classify)
-          else
-            super
-          end
-        end
-        
-        private
-        
-        # Returns a follow record for the current instance and followable object.
-        def get_follow(followable)
-          Follow.find(:first, :conditions =&gt; [&quot;follower_id = ? AND follower_type = ? AND followable_id = ? AND followable_type = ?&quot;, self.id, parent_class_name(self), followable.id, parent_class_name(followable)])
-        end
-
-      end
-      
-    end
-  end
-end
+require File.dirname(__FILE__) + '/follower_lib'
+
+module ActiveRecord #:nodoc:
+  module Acts #:nodoc:
+    module Follower
+      
+      def self.included(base)
+        base.extend ClassMethods
+        base.class_eval do
+          include FollowerLib
+        end
+      end
+      
+      module ClassMethods
+        def acts_as_follower
+          has_many :follows, :as =&gt; :follower, :dependent =&gt; :destroy
+          include ActiveRecord::Acts::Follower::InstanceMethods
+        end
+      end
+      
+      module InstanceMethods
+        
+        # Returns true if this instance is following the object passed as an argument.
+        def following?(followable)
+          0 &lt; Follow.count(:all, :conditions =&gt; [
+                &quot;follower_id = ? AND follower_type = ? AND followable_id = ? AND followable_type = ?&quot;,
+                 self.id, parent_class_name(self), followable.id, parent_class_name(followable)
+               ])
+        end
+        
+        # Returns the number of objects this instance is following.
+        def follow_count
+          Follow.count(:all, :conditions =&gt; [&quot;follower_id = ? AND follower_type = ?&quot;, self.id, parent_class_name(self)])
+        end
+        
+        # Creates a new follow record for this instance to follow the passed object.
+        # Does not allow duplicate records to be created.
+        def follow(followable)
+          follow = get_follow(followable)
+          unless follow
+            Follow.create(:followable =&gt; followable, :follower =&gt; self)
+          end
+        end
+        
+        # Deletes the follow record if it exists.
+        def stop_following(followable)
+          follow = get_follow(followable)
+          if follow
+            follow.destroy
+          end
+        end
+        
+        # TODO: Remove from public API.
+        # Returns the follow records related to this instance by type.
+        def follows_by_type(followable_type)
+          Follow.find(:all, :conditions =&gt; [&quot;follower_id = ? AND follower_type = ? AND followable_type = ?&quot;, self.id, parent_class_name(self), followable_type])
+        end
+        
+        # TODO: Remove from public API.
+        # Returns the follow records related to this instance by type.
+        def all_follows
+          Follow.find(:all, :include =&gt; [:followable], :conditions =&gt; [&quot;follower_id = ? AND follower_type = ?&quot;, self.id, parent_class_name(self)])
+        end
+        
+        # Returns the actual records which this instance is following.
+        def all_following
+          all_follows.map { |f| f.followable }
+        end
+        
+        # Returns the actual records of a particular type which this record is following.
+        def following_by_type(followable_type)
+          follows_by_type(followable_type).map { |f| f.followable }
+        end
+        
+        # Allows magic names on following_by_type
+        # e.g. following_users == following_by_type('User')
+        def method_missing(m, *args)
+          if m.to_s[/following_(.+)/]
+            following_by_type($1.singularize.classify)
+          else
+            super
+          end
+        end
+        
+        private
+        
+        # Returns a follow record for the current instance and followable object.
+        def get_follow(followable)
+          Follow.find(:first, :conditions =&gt; [&quot;follower_id = ? AND follower_type = ? AND followable_id = ? AND followable_type = ?&quot;, self.id, parent_class_name(self), followable.id, parent_class_name(followable)])
+        end
+        
+      end
+      
+    end
+  end
+end</diff>
      <filename>lib/acts_as_follower.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fe0b633574b7fd8de4249755ab435cb41bdfc737</id>
    </parent>
  </parents>
  <author>
    <name>Tom Cocca</name>
    <email>tom.cocca@gmail.com</email>
  </author>
  <url>http://github.com/tcocca/acts_as_follower/commit/6c03d40f6716e39a90f8461a5504951c198ed55e</url>
  <id>6c03d40f6716e39a90f8461a5504951c198ed55e</id>
  <committed-date>2009-04-30T17:55:06-07:00</committed-date>
  <authored-date>2009-04-30T17:55:06-07:00</authored-date>
  <message>minor cleanup</message>
  <tree>67634e96eef15b5646c8802039508d9cc85ad5da</tree>
  <committer>
    <name>Tom Cocca</name>
    <email>tom.cocca@gmail.com</email>
  </committer>
</commit>
