From df5ef2dc29e0bf8fe5c03b69a745dd9e06975c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 2 Sep 2015 17:06:11 +0200 Subject: [PATCH] makes helper independent of commentable class --- app/helpers/comments_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/comments_helper.rb b/app/helpers/comments_helper.rb index 5c41b3432..b6d066935 100644 --- a/app/helpers/comments_helper.rb +++ b/app/helpers/comments_helper.rb @@ -1,11 +1,11 @@ module CommentsHelper def comment_link_text(parent) - parent.class == Debate ? t("comments_helper.comment_link") : t("comments_helper.reply_link") + parent.is_a? Comment ? t("comments_helper.reply_link") : t("comments_helper.comment_link") end def comment_button_text(parent) - parent.class == Debate ? t("comments_helper.comment_button") : t("comments_helper.reply_button") + parent.is_a? Comment ? t("comments_helper.reply_button") : t("comments_helper.comment_button") end end \ No newline at end of file