refactors comment form

This commit is contained in:
Juanjo Bazán
2015-09-02 17:19:32 +02:00
committed by Juanjo Bazán
parent df5ef2dc29
commit eb689d7c7e
4 changed files with 21 additions and 20 deletions

View File

@@ -1,11 +1,11 @@
module CommentsHelper
def comment_link_text(parent)
parent.is_a? Comment ? t("comments_helper.reply_link") : t("comments_helper.comment_link")
def comment_link_text(parent_id)
parent_id.present? ? t("comments_helper.reply_link") : t("comments_helper.comment_link")
end
def comment_button_text(parent)
parent.is_a? Comment ? t("comments_helper.reply_button") : t("comments_helper.comment_button")
def comment_button_text(parent_id)
parent_id.present? ? t("comments_helper.reply_button") : t("comments_helper.comment_button")
end
end