refactor observers. Added BaseObserver with helper methods
This commit is contained in:
parent
6abf58466f
commit
ce0945efcd
9 changed files with 26 additions and 45 deletions
|
@ -1,11 +1,5 @@
|
|||
class NoteObserver < ActiveRecord::Observer
|
||||
class NoteObserver < BaseObserver
|
||||
def after_create(note)
|
||||
notification.new_note(note)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def notification
|
||||
NotificationService.new
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue