6cc4ac7b98
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
21 lines
344 B
Ruby
21 lines
344 B
Ruby
class BaseObserver < ActiveRecord::Observer
|
|
def notification
|
|
NotificationService.new
|
|
end
|
|
|
|
def event_service
|
|
EventCreateService.new
|
|
end
|
|
|
|
def log_info message
|
|
Gitlab::AppLogger.info message
|
|
end
|
|
|
|
def current_user
|
|
Thread.current[:current_user]
|
|
end
|
|
|
|
def current_commit
|
|
Thread.current[:current_commit]
|
|
end
|
|
end
|