*************************************************************************** *** EDIT config/routes.rb map.root :controller => 'preview', :action => 'index' # only if map.root not set map.with_options :controller => 'users', :path_prefix => '/user', :name_prefix => 'user_' do |user| user.login '/', :action => 'login_form', :conditions => { :method => :get } user.login '/', :action => 'login', :conditions => { :method => :post } user.logout '/logout', :action => 'logout' user.pswd_forgot '/pswd_forgot', :action => 'pswd_forgot_form', :conditions => { :method => :get } user.pswd_forgot '/pswd_forgot', :action => 'pswd_forgot', :conditions => { :method => :post } user.pswd_change '/pswd_change', :action => 'pswd_change_form', :conditions => { :method => :get } user.pswd_change '/pswd_change', :action => 'pswd_change', :conditions => { :method => :post } user.details '/user_details', :action => 'user_details', :conditions => { :method => :get } user.change '/user_change', :action => 'user_change_form', :conditions => { :method => :get } user.change '/user_change', :action => 'user_change', :conditions => { :method => :put } user.pswd_reset '/pswd_reset', :action => 'pswd_reset_form', :conditions => { :method => :get } user.pswd_reset '/pswd_reset', :action => 'pswd_reset', :conditions => { :method => :post } user.welcome '/welcome', :action => 'welcome_form', :conditions => { :method => :get } user.welcome '/welcome', :action => 'welcome', :conditions => { :method => :post } end map.namespace :admin do |admin| admin.resources :users, :controller => 'users' end *** EDIT config/environment.rb config.gem 'will_paginate' config.gem 'dougo_view_helpers' config.gem 'dougo_model_helpers' config.gem 'dougo_user_helpers' config.active_record.observers = :user_observer ActionController::Base.define_access_level(:more_access, 70) ActionController::Base.define_access_level(:less_access, 60) *** EDIT config/environments/producton.rb ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.smtp_settings = { :address => '...', :port => 25, . . . } Dougo::ControllerUserMail.host = 'domain.com' Dougo::ControllerUserMail.from = 'domain.com' Dougo::ControllerUserMail.prefix = 'My Cool App' *** EDIT config/environments/test.rb config.gem 'cucumber-rails', :lib => false, :version => '>=0.3.0' config.gem 'database_cleaner', :lib => false, :version => '>=0.5.0' config.gem 'webrat', :lib => false, :version => '>=0.7.0' config.gem "rspec", :version => '>=1.3.0', :lib => false config.gem "rspec-rails", :version => '>=1.3.2', :lib => false config.gem "faker", :version => '>=0.3.1', :lib => false config.gem "machinist", :version => '>=1.0.6', :lib => false config.gem 'rcov', :version => '>=0.9.8', :lib => false config.gem 'remarkable_rails', :version => '>=3.1.13', :lib => false require 'machinist/active_record' require 'sham' require 'faker' require 'remarkable_rails' *** EDIT spec/spec_helper.rb Spec::Runner.configure do |config| ... config.before(:each, :behaviour_type => :controller) do @controller.instance_eval { flash.stub!(:sweep) } end *** RUN rake db:migrate *** EDIT app/views/preview/index.html.erb

User Pages

restart app and goto http://localhost:3000/preview **************************************************************************