Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

get all active_notifiers and default empty inline_notify and out_of_c…

…hannel_notify for notifiers
  • Loading branch information...
commit b11b0d4b4bbd33675ebf157d6d1a9b2c53f2b2c2 1 parent 0964ed0
@flyerhzm authored
Showing with 12 additions and 0 deletions.
  1. +6 −0 lib/uniform_notifier.rb
  2. +6 −0 lib/uniform_notifier/base.rb
View
6 lib/uniform_notifier.rb
@@ -12,6 +12,12 @@ class NotificationError < StandardError; end
class <<self
attr_accessor :alert, :console, :growl, :rails_logger, :xmpp
+ NOTIFIERS = [JavascriptAlert, JavascriptConsole, Growl, Xmpp, RailsLogger, CustomizedLogger]
+
+ def active_notifiers
+ NOTIFIERS.select { |notifier| notifier.active? }
+ end
+
def growl=(growl)
UniformNotifier::Growl.setup_connection(growl)
end
View
6 lib/uniform_notifier/base.rb
@@ -4,6 +4,12 @@ def self.active?
false
end
+ def self.inline_notify( message )
+ end
+
+ def self.out_of_channel_notify( message )
+ end
+
def self.wrap_js_association( message )
<<-CODE
<script type="text/javascript">/*<![CDATA[*/
Please sign in to comment.
Something went wrong with that request. Please try again.