lib/courier/service/gritter_notice.rb in courier-0.1.3 vs lib/courier/service/gritter_notice.rb in courier-0.1.4

- old
+ new

@@ -4,13 +4,23 @@ def initialize raise "No GritterNotices. Add gem 'gritter_notices' to Gemfile." unless defined? GritterNotices super end + # + # В локале создается хеш всех параметров принимаемых GritterNotice + # + # template_key: + # title: Внимание! + # text: Ва прошли на новый уровень + # level: warning + # image: /images/warning.png + # + # + def message(owner, template, options) - options[:scope]=[:courier,:messages,:gritter_notice] unless options[:scope] - options[:text]=I18n::translate(name, options ) - owner.gritter_notice template.name, options + options[:scope]=[:courier, :gritter_notice] unless options[:scope] + owner.gritter_notice template.name, I18n::translate(template.name, options ) end def deliver! # Nothng to do, it's realtime delivered end