2013-06-27 15:37:41 +01:00
|
|
|
module Modules::Observers::ActivityFeed::User
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
2014-01-21 04:51:49 +00:00
|
|
|
after_commit :new_user_notification, on: :create
|
2013-06-27 15:37:41 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def new_user_notification
|
|
|
|
ActivityFeed.create(
|
2014-01-21 04:51:49 +00:00
|
|
|
user: self,
|
|
|
|
kind: 'new_user_notification',
|
|
|
|
data: {user_name: self.user_appeal, user_email: self.email}
|
2013-06-27 15:37:41 +01:00
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|