Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Welcome to the acts_as_authenticated wiki!
The following has been taken directory from the web archive.org
Please note that acts_as_authenticated, is no longer activlyed developed/maintained.
AAA was created by: technoweenie
AAA was salved by: gundestrup, for future referance/development
Everybody is welcome to pitch in, and update/expand/improce AAA, so please send me a mail, and I will give you write access.
ruby script/plugin install git://github.com/gundestrup/acts_as_authenticated.git
ruby script/generate authenticated user account
This step will also generate the required migration for the user table: In rails/app:
Read through controllers/account_controller , models/user.rb and lib/authenticated_system.rb
Put include AuthenticatedSystem in your application controller (make sure you put it in the class, not before it), and put before_filter :login_required in every controller you want protected. More details in account_controller.rb.
To get to user info inside a controller or view (like, say, their login name):
To create a user account, go to http://localhost:3000/account/signup (or wherever your server is accessible)
You can get additonal help at http://github.com/gundestrup/acts_as_authenticated/wikis wiki.
This almost worked instantly for me! I’m impressed. However, I did have to change line 11 of authenticated_system.rb to include User.find(session[:user])) instead of User.find_by_id(session[:user])), because Ruby wouldn’t recognize that function. Dunno why, I thought I had seen it before…
Also, I think this package could be even better if it included an “edit account” template.
Careful, User.find and User.findby_id are subtly different. find_by_id would return nil if it can’t find the user. find would raise an exception._
I have created a tag 1.0 to mark the original version.
The only difference is the readme file.
I have created a tag 2.0
Here the generator creates html.erb files.
Now it time to make sure it works with Rails 2
Tag 3.0 ?
Here I hope to integrade some of the features you can expand AAA with, to be build in options.