persistent_cookie_authentication_generator gem
Gem details
Documentation
Install the Gem:
gem install persistent_cookie_authentication_generator
From the directory of your Rails app, run this from the shell
ruby script/generate persistent_cookie_authentication
Change your config/database.yml settings. Then update your database by running
rake db:migrate
From app/controllers/application.rb, add this within application.rb
include UserSystem
From config/environment.rb, add this at the end of the file
require 'environments/user_environment' require 'smtp_tls'
From config/environments/, add this to the end of both development.rb and production.rb
ActionMailer::Base.smtp_settings = {:address => "smtp.gmail.com", :port => "587", :domain => "localhost.localdomain", :authentication => :plain, :user_name => "yourgmailusername", :password => "yourgmailpassword" }
From config/initializers/inflections.rb, modify your inflections.rb to look like this
Inflector.inflections do |inflect|# inflect.plural /^(ox)$/i, '1en' # inflect.singular /^(ox)en/i, '1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) inflect.irregular 'LoginCookie', 'LoginCookies' end
To test, run this from your shell
rake db:test:clone rake test
From config/user_environment.rb, change the name of your Rails app to your liking
Edit Gem | Back in time (3 older versions) | Last edited by: scott, 3 months ago

