- Under project folder, run "script/plugin source http://svn.techno-weenie.net/projects/plugins/"
- Under project folder, run "script/plugin install restful_authentication"
- Under project folder, run "script/generate authenticated user sessions"
- Inside route.rb, add "map.activate '/activate/:activation_code', :controller => 'users', :action => 'activate', :activation_code => nil"
- Inside route.rb, add "map.signup '/signup', :controller => 'users', :action => 'new'"
- Inside route.rb, add "map.login '/login', :controller => 'sessions', :action => 'new'"
- Inside route.rb, add "map.logout '/logout', :controller => 'sessions', :action => 'destroy'"
- Under project folder, run "rake db:migrate"
- Inside, app controller, add "include AuthenticatedSystem" to application controller
- Inside, app controller, add "before_filter :login_required" to controller requiring authentication
Thursday, September 11, 2008
Install Restful Authentication
Steps:
Thursday, August 21, 2008
Install sqlite3 on Windows for Ruby on Rails
- Go to http://www.sqlite.org, and download sqlitedll under "Precompiled Binaries For Windows".
- Extract the file and put two files sqlite3.dll and sqlite3.def in the ruby bin's directory, i.e., C:\ruby\bin.
- Run "gem install sqlite3-ruby" to install sqlite3-ruby gem. (Try "gem install --version 1.2.3 sqlite3-ruby" if the latest version is not working)
- For GUI interface, download "SQLite Manager" plugin for Firefox.
- Under your project, config/database.yml, make sure you use sqlite3 adapter. Something like: development:
adapter: sqlite3
database: db/development.sqlite3
timeout: 5000
Subscribe to:
Posts (Atom)