Class: Windbag::Notification

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/windbag/notification.rb

Instance Method Summary collapse

Instance Method Details

#channel_nameObject



23
24
25
# File 'app/models/windbag/notification.rb', line 23

def channel_name
  self.channel.name if self.channel
end

#convert_transportsObject



19
20
21
# File 'app/models/windbag/notification.rb', line 19

def convert_transports
  self.transports = self.transports.map {|t| t.to_s}
end

#deliverObject



13
14
15
16
17
# File 'app/models/windbag/notification.rb', line 13

def deliver
  self.transports.each do |transport|
    transport.constantize.with(self.id).deliver
  end
end