From ddb98502b9b46ee6a267eb668cd4e58da797cd0a Mon Sep 17 00:00:00 2001 From: ilya Date: Thu, 7 Oct 2010 19:25:34 -0700 Subject: [PATCH] setup the controller, still need to make the person --- app/models/user.rb | 2 ++ config/initializers/devise.rb | 5 +++++ config/routes.rb | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 31f8d1057..48366d890 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -21,6 +21,8 @@ class User key :username, :unique => true key :serialized_private_key, String + key :invitation_token, String + key :invitation_sent_at, DateTime key :friend_ids, Array key :pending_request_ids, Array key :visible_post_ids, Array diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 620547cd5..ee032c910 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -44,6 +44,11 @@ Devise.setup do |config| # Setup a pepper to generate the encrypted password. config.pepper = "065eb8798b181ff0ea2c5c16aee0ff8b70e04e2ee6bd6e08b49da46924223e39127d5335e466207d42bf2a045c12be5f90e92012a4f05f7fc6d9f3c875f4c95b" + # ==> Configuration for :invitable + # Time interval where the invitation token is valid (default: 0). + # If invite_for is 0 or nil, the invitation will never expire. + # config.invite_for = 2.weeks + # ==> Configuration for :confirmable # The time you want to give your user to confirm his account. During this time # he will be able to access your application without confirming. Default is nil. diff --git a/config/routes.rb b/config/routes.rb index 2d043682d..1a4f6ed3d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -11,7 +11,8 @@ Diaspora::Application.routes.draw do resources :albums devise_for :users, :controllers => {:registrations => "registrations", - :password => "devise/passwords"} + :password => "devise/passwords", + :invitation => "invitations"} # added public route to user match 'public/:username', :to => 'users#public' match 'users/export', :to => 'users#export'