I know, I showed some ghetto ERD skillz on part 1, but I would like to try out some of the gems out there that has a pimp implementation of user authentication.
I talked to sideline and the semi-hottest .rb developer in cowtown, and they recommended Acts as Authenticated. So I'm trying it...
So far, not so bad... Installing it was cakes script/plugin install http://svn.techno-weenie.net/projects/plugins/acts_as_authenticated
then
script/generate authenticated user account
then
update your database.yml with the proper credentials to your db
then if you're using mysql
mysqladmin -u root -p create <database name>
then
rake db:migrate
if all goes well, your iTerm should look like:
also, it will create a "Users" table on your database
So now what?
Check out what you created! goto your browser and type: http://localhost:3000/account/index
and you will see a signup page

once you register, you will see..

what the hell is that???
looking @ the account_controller.rb file, especially the index method it does some logic... check you the screenshot:

also, check out
<project>/app/views/account/index.rhtml... there it is! that weird poem... get rid of that, and put something that makes sense... for me it's jonas is a f*cking stud!

by viewing the account_controller.rb, you will get an idea all the stuff that is exposed: index, login, signup, logout
so that means when you go to your site, http://localhost:3000/accounts/<operation>, just put the operation you want, and you will do one of the four

This is ezed signing off for part deuce!... Watch out for part tres for the rake migrations! nyahhhhhHH!

0 comments:
Post a Comment