On Friday, January 24, 2014 2:34:45 AM UTC+1, Bizt wrote:
>
> I'm new to Rails but so far I've completed the Rails Tutorial book and 
> applying that stuff to my first proper app. Later I will tackle 
> implementing user authentication (sign up, sign in, sign out)
>
> In the book it demonstrates very well how to sign users up, validate, etc. 
> Usually in my PHP apps I have a process of allowing the user to signup, 
> then they are sent a link to confirm their email address, then (from that 
> link in the email) they can activate their account. In the backend, I use 
> two tables - user_pending (for users who have signed up, but not yet 
> activated their account), and user (for activated users). I decided a while 
> back that I would use two tables as I didn't want the user table to get 
> bogged down with users who never activate their account. Perhaps this is 
> not too important, and I'm giving myself more work.
>


This does rather sound like premature optimisation to me. 
 

>
> Anyway could someone perhaps comment on what is the most commonly 
> practiced technique for activating users - I'm assuming via email 
> activation as this is what I see most when I sign up for new apps myself. 
> If I do this process, should I use one table (user - with "activated" flag 
> column) or two tables (user_pending and user - when users activate, the row 
> is copied to user). Any comments welcome, especially if their is a newer 
> better way to perform this process.
>
>  
The standard approach is email activation with a single users table. A lot 
of people use the devise gem for authentication, which has this built in - 
 - you could either just use devise or examine its approach in more detail 
before rolling your own.

Fred

 

> Thank you
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/c269b3aa-ac14-43e9-bc6f-d19340e94db5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to