lib/courier/service/gritter_notice.rb in courier-0.1.4 vs lib/courier/service/gritter_notice.rb in courier-0.1.5
- old
+ new
@@ -16,11 +16,14 @@
# image: /images/warning.png
#
#
def message(owner, template, options)
- options[:scope]=[:courier, :gritter_notice] unless options[:scope]
- owner.gritter_notice template.name, I18n::translate(template.name, options )
+ scope = [:courier, :gritter_notice]
+ opt = I18n::translate(template.name, :scope=>scope)
+ opt.merge!(options)
+ opt[:text]||=I18n::translate([template.name,:text], opt.merge(:scope=>scope) )
+ owner.gritter_notice template.name, opt
end
def deliver!
# Nothng to do, it's realtime delivered
end