summaryrefslogtreecommitdiffstats
path: root/lib/redmine/notifiable.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-09-28 20:19:55 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-09-28 20:19:55 +0000
commit244e94de80751091f3ef0208dfb6b8502a6c13eb (patch)
tree81985b3bd29f2649c265ef61ee6a3b39c55c4884 /lib/redmine/notifiable.rb
parent582ed86d828bb957a7844832c627b425884d0716 (diff)
downloadredmine-244e94de80751091f3ef0208dfb6b8502a6c13eb.tar.gz
redmine-244e94de80751091f3ef0208dfb6b8502a6c13eb.zip
Refactor the hardcoded event actions (notifiables) to use a class
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4220 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/notifiable.rb')
-rw-r--r--lib/redmine/notifiable.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/redmine/notifiable.rb b/lib/redmine/notifiable.rb
new file mode 100644
index 000000000..fa192ab25
--- /dev/null
+++ b/lib/redmine/notifiable.rb
@@ -0,0 +1,19 @@
+module Redmine
+ class Notifiable
+ CoreNotifications = [
+ 'issue_added',
+ 'issue_updated',
+ 'news_added',
+ 'document_added',
+ 'file_added',
+ 'message_posted',
+ 'wiki_content_added',
+ 'wiki_content_updated'
+ ]
+
+ # TODO: Plugin API for adding a new notification?
+ def self.all
+ CoreNotifications
+ end
+ end
+end