Skip to content

Commit 3d56071

Browse files
Merge pull request #94 from elight/feature/address_rails_5_warning
Fix issue that was causing problems for Rails 5
2 parents 406b1e3 + 4ccaa8b commit 3d56071

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/acts_as_commentable_with_threading.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module SingletonMethods
2828
# Helper method to lookup for comments for a given object.
2929
# This method is equivalent to obj.comments.
3030
def find_comments_for(obj)
31-
Comment.where(:commentable_id => obj.id, :commentable_type => obj.class.base_class).order('created_at DESC')
31+
Comment.where(:commentable_id => obj.id, :commentable_type => obj.class.base_class.name).order('created_at DESC')
3232
end
3333

3434
# Helper class method to lookup comments for

0 commit comments

Comments
 (0)