Permalink
Browse files

Fixed: ClassMethod should use self instead of self.class

  • Loading branch information...
1 parent 08d1b14 commit 77426e9c54c6fe8d35d81a4b9851263e4f1c59df @patroza committed May 7, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/make_watchable/watchable.rb
@@ -16,8 +16,9 @@ def watchable?
# Thus we should also search for the baseclass when querying
def sti_base_class
return @sti_base_class unless @sti_base_class.nil?
- klass = self.class
- self.class.ancestors.each do |k|
+
+ klass = self
+ self.ancestors.each do |k|
break if k == ActiveRecord::Base # we reached the bottom of this barrel
klass = k if k.is_a? Class
end

0 comments on commit 77426e9

Please sign in to comment.