lib/mongoid_followable/follower.rb
def unfollow(*models)
      models.each do |model|
        unless model == self or !self.follower_of?(model) or !model.followee_of?(self) or self.cannot_follow.include?(model.class.name) or model.cannot_followed.include?(self.class.name)
          model.followers.by_model(self).first.destroy
          self.followees.by_model(model).first.destroy
        end
      end
    end
def unfollow(*models)
      models.each do |model|
        unless model == self or !self.follower_of?(model) or !model.followee_of?(self) or self.cannot_follow.include?(model.class.name) or model.cannot_followed.include?(self.class.name)
          model.followers.by_model(self).first.destroy
          self.followees.by_model(model).first.destroy
        end
      end
    end
def unfollow ( * models ) models . each do | model | unless model == self or ! self . follower_of? ( model ) or ! model . followee_of? ( self ) or self . cannot_follow . include? ( model . class . name ) or model . cannot_followed . include? ( self . class . name ) model . followers . by_model ( self ) . first . destroy self . followees . by_model ( model ) . first . destroy end end end
unfollow some model
unfollow some model