We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 406b1e3 + 4ccaa8b commit 3d56071Copy full SHA for 3d56071
lib/acts_as_commentable_with_threading.rb
@@ -28,7 +28,7 @@ module SingletonMethods
28
# Helper method to lookup for comments for a given object.
29
# This method is equivalent to obj.comments.
30
def find_comments_for(obj)
31
- Comment.where(:commentable_id => obj.id, :commentable_type => obj.class.base_class).order('created_at DESC')
+ Comment.where(:commentable_id => obj.id, :commentable_type => obj.class.base_class.name).order('created_at DESC')
32
end
33
34
# Helper class method to lookup comments for
0 commit comments