how to invite cross scope devise

13 views
Skip to first unread message

Paritosh Piplewar

unread,
May 9, 2013, 7:24:31 PM5/9/13
to plataforma...@googlegroups.com
i have 3 scopes , :user , :tenant , :client  . Now i dont want :tenant and :client should have direct registration , so i removed :registerable from both :tenant and :client . I also want :user to invite both :client and :tenant . so i used https://github.com/scambra/devise_invitable  and added in :user model . With devise_invitable I only able to invite users who are already a user, this is not what i want. i want to invite cross :scope members . How can i ? Please give me some idea . 
Thanks 

Lucas Mazza

unread,
May 26, 2013, 6:36:03 PM5/26/13
to plataforma...@googlegroups.com
I'm not familiar with DeviseInvitable, but I believe that you can you a custom set of views and controllers to take control of the invitation process and use your own logic to call something like `Client.invite!` or `Tenant.invite!`. A good place to start is the `create` action from the InvitationsController. https://github.com/scambra/devise_invitable/blob/a46bfc05bf7247de2a4f3bc89d963dd0518c6c95/app/controllers/devise/invitations_controller.rb#L16-L25

I hope it helps.


On Thu, May 9, 2013 at 8:24 PM, Paritosh Piplewar <paritoshp...@gmail.com> wrote:
i have 3 scopes , :user , :tenant , :client  . Now i dont want :tenant and :client should have direct registration , so i removed :registerable from both :tenant and :client . I also want :user to invite both :client and :tenant . so i used https://github.com/scambra/devise_invitable  and added in :user model . With devise_invitable I only able to invite users who are already a user, this is not what i want. i want to invite cross :scope members . How can i ? Please give me some idea . 
Thanks 

--
 
---
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.
 
 

Reply all
Reply to author
Forward
0 new messages