devise 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of devise might be problematic. Click here for more details.
- data/README.rdoc +13 -2
- data/Rakefile +1 -1
- data/lib/devise.rb +1 -0
- data/lib/devise/version.rb +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -31,10 +31,15 @@ Install warden gem if you don't have it installed (requires 0.5.0 or higher):
|
|
31
31
|
|
32
32
|
sudo gem install warden
|
33
33
|
|
34
|
-
Install devise
|
34
|
+
Install devise gem:
|
35
35
|
|
36
36
|
sudo gem install devise
|
37
37
|
|
38
|
+
Configure warden and devise gems inside your app:
|
39
|
+
|
40
|
+
config.gem 'warden'
|
41
|
+
config.gem 'devise'
|
42
|
+
|
38
43
|
And you're ready to go.
|
39
44
|
|
40
45
|
== Basic Usage
|
@@ -155,7 +160,13 @@ You have also access to the session for this scope:
|
|
155
160
|
|
156
161
|
user_session
|
157
162
|
|
158
|
-
After signing in a user, confirming it's account or updating it's password, devise will look for a scoped root path to redirect. Example: For a :user resource, it will use user_root_path if it exists, otherwise default root_path will be used.
|
163
|
+
After signing in a user, confirming it's account or updating it's password, devise will look for a scoped root path to redirect. Example: For a :user resource, it will use user_root_path if it exists, otherwise default root_path will be used. To do it so, you need to create e default root inside your routes for your application:
|
164
|
+
|
165
|
+
map.root :controller => 'home'
|
166
|
+
|
167
|
+
You also need to setup default url options for the mailer, if you are using confirmable or recoverable. It's a Rails required configuration, and you can do this inside your specific environments. Here is an example of development environment:
|
168
|
+
|
169
|
+
config.action_mailer.default_url_options = {:host => 'localhost:3000'}
|
159
170
|
|
160
171
|
Devise let's you setup as many roles as you want, so let's say you already have this User model and also want an Admin model with the same authentication stuff, but not confirmation or password recovery. Just follow the same steps:
|
161
172
|
|
data/Rakefile
CHANGED
@@ -29,7 +29,7 @@ begin
|
|
29
29
|
require 'jeweler'
|
30
30
|
Jeweler::Tasks.new do |s|
|
31
31
|
s.name = "devise"
|
32
|
-
s.version =
|
32
|
+
s.version = Devise::VERSION
|
33
33
|
s.summary = "Flexible authentication solution for Rails with Warden"
|
34
34
|
s.email = "contact@plataformatec.com.br"
|
35
35
|
s.homepage = "http://github.com/plataformatec/devise"
|
data/lib/devise.rb
CHANGED
data/lib/devise/version.rb
CHANGED