Class: Course::LevelNotifier

Inherits:
Notifier::Base
  • Object
show all
Defined in:
app/notifiers/course/level_notifier.rb

Instance Method Summary collapse

Instance Method Details

#level_reached(user, level) ⇒ Object

To be called when user reached a new level.


4
5
6
7
8
9
# File 'app/notifiers/course/level_notifier.rb', line 4

def level_reached(user, level)
  create_activity(actor: user, object: level, event: :reached).
    notify(level.course, :feed).
    notify(user, :popup).
    save
end