uses resource_class instead of controller_name

This commit is contained in:
rgarcia
2015-09-28 20:46:18 +02:00
parent 75181e9cf4
commit 0074422977
3 changed files with 8 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ module Commentable
end
def commentable_name
@commentable_name ||= controller_name.singularize
@commentable_name ||= resource_class.to_s.downcase.singularize
end
def commentable_model