Skip to content

Commit

Permalink
use base_class method for STI compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
brchristian authored and LeFnord committed Jan 21, 2021
1 parent 3f98ff6 commit 33a297d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/acts_as_follower/follower_lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module FollowerLib
# Retrieves the parent class name if using STI.
def parent_class_name(obj)
unless parent_classes.include?(obj.class.superclass)
return obj.class.superclass.name
return obj.class.base_class.name
end
obj.class.name
end
Expand Down

0 comments on commit 33a297d

Please sign in to comment.