On 13 September 2012 11:36, angel david
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
wrote:> Hi All,
>
>
> I have a requirement.
>
> A person will sign up to my site and send invitations to some users. The
> person who sign-up will be taken as admin and will be stored in admin
> table.
>
> Other users who get invitations through mail will be stored in user
> table.
It is usually best in this sort of situation to have just one table
for both. Often a gem like cancan is used to allocate different roles
to individual users (admin, normal user for example), though in a
simple case perhaps just a flag is needed.
>
> I used devise for admin sign-up.
>
> Now as normal users no need to sign-up I dint use devise.
>
> The problem here is that there will be only one sign-in form which both
> admin and user will use. How should this be done in devise?
If you have only one table then the problem may disappear. You just
need to provide for the two roles.
Colin
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.