refactor observers. Added BaseObserver with helper methods

This commit is contained in:
Dmitriy Zaporozhets 2013-03-26 18:11:38 +02:00
parent 6abf58466f
commit ce0945efcd
9 changed files with 26 additions and 45 deletions

View file

@ -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