From 0a62ae2b2649623dace3e6d99f28d02946021a65 Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Wed, 20 Aug 2014 02:28:01 -0300 Subject: [PATCH] define a lobby note title dinamically --- plugins/notification/lib/notification_plugin/lobby_note_content.rb | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) diff --git a/plugins/notification/lib/notification_plugin/lobby_note_content.rb b/plugins/notification/lib/notification_plugin/lobby_note_content.rb index 707f4db..38f8741 100644 --- a/plugins/notification/lib/notification_plugin/lobby_note_content.rb +++ b/plugins/notification/lib/notification_plugin/lobby_note_content.rb @@ -1,5 +1,7 @@ class NotificationPlugin::LobbyNoteContent < Event + before_validation :set_title + def self.short_description 'Lobby note for gatekeepers' end @@ -8,6 +10,11 @@ class NotificationPlugin::LobbyNoteContent < Event 'Notify gatekeeper' end + def set_title + self.name = _('Notification %s') % self.profile.lobby_notes.count unless self.profile.nil? + end + + #FIXME make the html output specific # def to_html(options = {}) # source = options["source"] -- libgit2 0.21.2