Notification on registered user

32 views
Skip to first unread message

Refael Dakar

unread,
Mar 18, 2013, 12:52:16 PM3/18/13
to plataforma...@googlegroups.com
I want to do some work after the user signs up. Is there a way to be notified on user successful registration ?

after_sign_up_path_for... is not good for me. I want the user to still be redirected to the default location.


Lucas Mazza

unread,
Mar 18, 2013, 1:31:00 PM3/18/13
to plataforma...@googlegroups.com
You could add an `after_create` callback but the best way would be to create your own RegistrationsControllers, with the same (or most of it) code from original controller and yours on the `create` action.


On Mon, Mar 18, 2013 at 1:52 PM, Refael Dakar <refae...@gmail.com> wrote:
I want to do some work after the user signs up. Is there a way to be notified on user successful registration ?

after_sign_up_path_for... is not good for me. I want the user to still be redirected to the default location.


--
 
---
You received this message because you are subscribed to the Google Groups "Devise" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Refael Dakar

unread,
Mar 18, 2013, 2:20:23 PM3/18/13
to plataforma...@googlegroups.com
I thought they might have added a more sophisticated way to do that.

Thanks !


On Monday, March 18, 2013 7:31:00 PM UTC+2, Lucas Mazza wrote:
You could add an `after_create` callback but the best way would be to create your own RegistrationsControllers, with the same (or most of it) code from original controller and yours on the `create` action.
On Mon, Mar 18, 2013 at 1:52 PM, Refael Dakar <refae...@gmail.com> wrote:
I want to do some work after the user signs up. Is there a way to be notified on user successful registration ?

after_sign_up_path_for... is not good for me. I want the user to still be redirected to the default location.


--
 
---
You received this message because you are subscribed to the Google Groups "Devise" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-devise+unsub...@googlegroups.com.

and...@benjamin.dk

unread,
Mar 20, 2013, 5:08:17 AM3/20/13
to plataforma...@googlegroups.com
I would say you can do a class called MyRegistrationController < Devise::RegistrationsController
and simply redef the create action

much better then rewriting the whole thing

Stefan Wrobel

unread,
May 15, 2013, 8:47:44 PM5/15/13
to plataforma...@googlegroups.com
Is there any simple way to wire ActiveSupport::Notifications into Devise?

Lucas Mazza

unread,
May 15, 2013, 9:11:18 PM5/15/13
to plataforma...@googlegroups.com
Depends on what pieces of code you want to wrap with AS::Notifications, but in general it can be pretty easy.


To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-de...@googlegroups.com.

Stefan Wrobel

unread,
May 15, 2013, 9:45:44 PM5/15/13
to plataformatec-devise

I think the primary one that anyone would want to track with analytics is user registrations ... perhaps that's just an after_create on user, but it seems to make much more sense to do it as an AS::Notification on the devise controller method.


You received this message because you are subscribed to a topic in the Google Groups "Devise" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/plataformatec-devise/97SKQCI1afY/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to plataformatec-de...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages