Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #AUTHLOGIC BASIC SETUP - NOT FINISHED YET
- inside("vendor") do
- run "cp -r ~/rails_templates/base/plugins/authlogic plugins/"
- end
- generate :controller, "Users", "index", "show", "new", "create", "edit", "update", "destroy"
- generate :model, "User", "username:string", "email:string", "crypted_password:string", "persistence_token:string", "password_salt:string"
- rake "db:migrate"
- generate :controller, "UsersSession", "new", "destroy"
- generate :model, "UserSession", "username:string", "password:string"
- inside('public') do
- run 'rm index.html'
- run 'cp ~/rails_templates/base/stylesheets/default.css stylesheets/'
- run 'cp ~/rails_templates/base/stylesheets/reset.css stylesheets/'
- end
- inside('app/views') do
- run 'cp ~/rails_templates/base/application.html.erb layouts/'
- end
- run 'rm config/routes.rb'
- file 'config/routes.rb', <<-CODE
- ActionController::Routing::Routes.draw do |map|
- map.root :controller => "users_session", :action => "new"
- #Named routes
- map.login 'login', :controller => 'users_session', :action => 'new'
- map.logout 'logout', :controller => 'users_session', :action => 'destroy'
- #Default routes
- map.connect ':controller/:action/:id'
- map.connect ':controller/:action/:id.:format'
- end
- CODE
- run 'script/server'
Add Comment
Please, Sign In to add comment