From 1029fd58541d578614b3837568393622c0c32db7 Mon Sep 17 00:00:00 2001
From: maxwell <maxwell@joindiaspora.com>
Date: Sun, 13 Jun 2010 16:28:48 -0700
Subject: [PATCH] made devise routes slightly more intutive. chore completed MS

---
 config/initializers/devise.rb             | 4 ++--
 config/routes.rb                          | 9 ++++++++-
 spec/controllers/users_controller_spec.rb | 2 +-
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 46d665c8b3..9eccb2137f 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -101,11 +101,11 @@ Devise.setup do |config|
   # scope, setting true below.
   # Note that devise does not generate default routes. You also have to
   # specify them in config/routes.rb
-  # config.use_default_scope = true
+  config.use_default_scope = true
 
   # Configure the default scope used by Devise. By default it's the first devise
   # role declared in your routes.
-  # config.default_scope = :user
+  config.default_scope = :user
 
   # ==> Navigation configuration
   # Lists the formats that should be treated as navigational. Formats like
diff --git a/config/routes.rb b/config/routes.rb
index bba921b33e..d6e3f799e8 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,7 +1,14 @@
 Diaspora::Application.routes.draw do |map|
-  devise_for :users
+  #routes for devise, not really sure you will need to mess with this in the future, lets put default,
+  #non mutable stuff in anohter file
+  devise_for :users, :path_names  => {:sign_up  => "signup", :sign_in  => "login", :sign_out  => "logout"}
+   match 'login', :to => 'devise/sessions#new', :as => "new_user_session"
+   match 'logout', :to  => 'devise/sessions#destroy', :as => "destroy_user_session"
+   match 'signup', :to => 'devise/registrations#new', :as => "new_user_registration"
+  
 
   resources :users
+  
 
   # The priority is based upon order of creation:
   # first created -> highest priority.
diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb
index d35a395a52..a22d30ea4a 100644
--- a/spec/controllers/users_controller_spec.rb
+++ b/spec/controllers/users_controller_spec.rb
@@ -4,6 +4,6 @@ describe UsersController do
   render_views
   #fixtures here?
   it 'should, after logging in redirect to the dashboard page' do
-
+    pending
   end
 end
-- 
GitLab