put the scheduling logic into session create action

This commit is contained in:
Miha Mencin 2019-03-05 10:43:39 +01:00
parent 6deaff6382
commit 67fe486874

View file

@ -45,8 +45,8 @@ class Users::SessionsController < Devise::SessionsController
end
end
def after_sign_in
flash[:system_notification_modal] = true
def create
super
# Schedule templates creation for user
TemplatesService.new.schedule_creation_for_user(current_user)
@ -60,6 +60,10 @@ class Users::SessionsController < Devise::SessionsController
end
end
def after_sign_in
flash[:system_notification_modal] = true
end
protected
# If you have extra params to permit, append them to the sanitizer.