Files
nairobi/app/helpers/notifications_helper.rb
Julian Herrero d9ba3edc2a mostrar notificaciones a los usuarios cuando alguien comenta en su
debate o responde a su comentario
2016-01-05 17:43:44 +01:00

17 lines
425 B
Ruby

module NotificationsHelper
def notification_text_for(notification)
case notification.activity.action
when "debate_comment"
t("comments.notifications.commented_on_your_debate")
when "comment_reply"
t("comments.notifications.replied_to_your_comment")
end
end
def notifications_class_for(user)
user.notifications.unread.count > 0 ? "with_notifications" : "without_notifications"
end
end