2014-03-11 07:39:25 +00:00
|
|
|
module Feed::User
|
2013-06-27 15:37:41 +01:00
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
2014-03-26 21:12:56 +00:00
|
|
|
after_commit :new_user_notification, on: :create
|
2013-06-27 15:37:41 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def new_user_notification
|
2014-03-11 13:44:30 +00:00
|
|
|
activity_feeds.create(
|
2014-01-21 04:51:49 +00:00
|
|
|
kind: 'new_user_notification',
|
2014-03-11 13:44:30 +00:00
|
|
|
data: { user_name: user_appeal, user_email: email }
|
2013-06-27 15:37:41 +01:00
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|