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.

@@ -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 inside your app:
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 = "0.1.0"
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"
@@ -45,4 +45,5 @@ Rails.configuration.after_initialize do
45
45
  end
46
46
 
47
47
  require 'devise/warden'
48
+ require 'devise/mapping'
48
49
  require 'devise/routes'
@@ -1,3 +1,3 @@
1
1
  module Devise
2
- VERSION = "0.1.0".freeze
2
+ VERSION = "0.1.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Jos\xC3\xA9 Valim"