devise 0.8.2 → 0.9.0

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.

Files changed (80) hide show
  1. data/CHANGELOG.rdoc +21 -2
  2. data/README.rdoc +40 -54
  3. data/Rakefile +1 -1
  4. data/TODO +1 -3
  5. data/app/controllers/confirmations_controller.rb +9 -20
  6. data/app/controllers/passwords_controller.rb +9 -20
  7. data/app/controllers/sessions_controller.rb +9 -9
  8. data/app/controllers/unlocks_controller.rb +22 -0
  9. data/app/models/devise_mailer.rb +6 -1
  10. data/app/views/confirmations/new.html.erb +1 -5
  11. data/app/views/devise_mailer/unlock_instructions.html.erb +7 -0
  12. data/app/views/passwords/edit.html.erb +1 -5
  13. data/app/views/passwords/new.html.erb +1 -5
  14. data/app/views/sessions/new.html.erb +1 -7
  15. data/app/views/shared/_devise_links.erb +15 -0
  16. data/app/views/unlocks/new.html.erb +12 -0
  17. data/generators/devise/templates/migration.rb +2 -0
  18. data/generators/devise/templates/model.rb +4 -1
  19. data/generators/devise_install/templates/devise.rb +20 -10
  20. data/lib/devise.rb +62 -18
  21. data/lib/devise/controllers/common.rb +24 -0
  22. data/lib/devise/controllers/helpers.rb +160 -80
  23. data/lib/devise/controllers/internal_helpers.rb +120 -0
  24. data/lib/devise/controllers/url_helpers.rb +2 -10
  25. data/lib/devise/encryptors/bcrypt.rb +2 -2
  26. data/lib/devise/hooks/activatable.rb +1 -4
  27. data/lib/devise/hooks/rememberable.rb +30 -0
  28. data/lib/devise/hooks/timeoutable.rb +4 -2
  29. data/lib/devise/locales/en.yml +9 -2
  30. data/lib/devise/mapping.rb +15 -11
  31. data/lib/devise/models.rb +16 -35
  32. data/lib/devise/models/activatable.rb +1 -1
  33. data/lib/devise/models/authenticatable.rb +1 -9
  34. data/lib/devise/models/confirmable.rb +6 -2
  35. data/lib/devise/models/lockable.rb +142 -0
  36. data/lib/devise/models/rememberable.rb +19 -2
  37. data/lib/devise/models/timeoutable.rb +1 -2
  38. data/lib/devise/orm/active_record.rb +2 -0
  39. data/lib/devise/orm/data_mapper.rb +1 -1
  40. data/lib/devise/orm/mongo_mapper.rb +12 -1
  41. data/lib/devise/rails/routes.rb +5 -1
  42. data/lib/devise/rails/warden_compat.rb +13 -13
  43. data/lib/devise/schema.rb +7 -0
  44. data/lib/devise/strategies/authenticatable.rb +1 -3
  45. data/lib/devise/strategies/base.rb +1 -1
  46. data/lib/devise/strategies/rememberable.rb +37 -0
  47. data/lib/devise/test_helpers.rb +1 -1
  48. data/lib/devise/version.rb +1 -1
  49. data/test/controllers/helpers_test.rb +155 -33
  50. data/test/controllers/internal_helpers_test.rb +55 -0
  51. data/test/devise_test.rb +24 -3
  52. data/test/encryptors_test.rb +3 -1
  53. data/test/integration/lockable_test.rb +83 -0
  54. data/test/integration/rememberable_test.rb +1 -1
  55. data/test/mailers/unlock_instructions_test.rb +62 -0
  56. data/test/models/authenticatable_test.rb +0 -23
  57. data/test/models/lockable_test.rb +202 -0
  58. data/test/models/timeoutable_test.rb +7 -7
  59. data/test/models/validatable_test.rb +2 -2
  60. data/test/models_test.rb +9 -76
  61. data/test/orm/active_record.rb +1 -0
  62. data/test/orm/mongo_mapper.rb +0 -1
  63. data/test/rails_app/app/active_record/admin.rb +1 -1
  64. data/test/rails_app/app/active_record/user.rb +2 -1
  65. data/test/rails_app/app/mongo_mapper/admin.rb +1 -1
  66. data/test/rails_app/app/mongo_mapper/user.rb +2 -1
  67. data/test/rails_app/config/initializers/devise.rb +13 -10
  68. data/test/rails_app/config/routes.rb +5 -3
  69. data/test/routes_test.rb +5 -0
  70. data/test/support/integration_tests_helper.rb +1 -0
  71. metadata +16 -12
  72. data/lib/devise/controllers/filters.rb +0 -186
  73. data/lib/devise/models/cookie_serializer.rb +0 -21
  74. data/lib/devise/models/session_serializer.rb +0 -19
  75. data/lib/devise/serializers/base.rb +0 -23
  76. data/lib/devise/serializers/cookie.rb +0 -43
  77. data/lib/devise/serializers/session.rb +0 -22
  78. data/test/controllers/filters_test.rb +0 -177
  79. data/test/rails_app/app/active_record/account.rb +0 -7
  80. data/test/rails_app/app/mongo_mapper/account.rb +0 -9
@@ -1,15 +1,34 @@
1
+ == 0.9.0
2
+
3
+ * deprecation
4
+ * devise :all is deprecated
5
+ * :success and :failure flash messages are now :notice and :alert
6
+
7
+ * enhancements
8
+ * Added devise lockable (by github.com/mhfs)
9
+ * Warden 0.9.0 compatibility
10
+ * Mongomapper 0.6.10 compatibility
11
+ * Added Devise.add_module as hooks for extensions (by github.com/grimen)
12
+ * Ruby 1.9.1 compatibility (by github.com/grimen)
13
+
14
+ * bug fix
15
+ * Accept path prefix not starting with slash
16
+ * url helpers should rely on find_scope!
17
+
1
18
  == 0.8.2
2
19
 
3
20
  * enhancements
4
- * Allow Devise.mailer_sender to be a proc (by github/grimen)
21
+ * Allow Devise.mailer_sender to be a proc (by github.com/grimen)
5
22
 
6
23
  * bug fix
7
- * Fix bug with passenger, update is required to anyone deploying on passenger (by github/dvdpalm)
24
+ * Fix bug with passenger, update is required to anyone deploying on passenger (by github.com/dvdpalm)
8
25
 
9
26
  == 0.8.1
10
27
 
11
28
  * enhancements
12
29
  * Move salt to encryptors
30
+ * Devise::Lockable
31
+ * Moved view links into partial and I18n'ed them
13
32
 
14
33
  * bug fix
15
34
  * Bcrypt generator was not being loaded neither setting the proper salt
@@ -7,7 +7,7 @@ Devise is a flexible authentication solution for Rails based on Warden. It:
7
7
  * Allows you to have multiple roles (or models/scopes) signed in at the same time;
8
8
  * Is based on a modularity concept: use just what you really need.
9
9
 
10
- Right now it's composed of six modules included by default when you invoke "devise :all" in your models:
10
+ Right now it's composed of nine modules:
11
11
 
12
12
  * Authenticatable: responsible for encrypting password and validating authenticity of a user while signing in.
13
13
  * Confirmable: responsible for verifying whether an account is already confirmed to sign in, and to send emails with confirmation instructions.
@@ -15,11 +15,9 @@ Right now it's composed of six modules included by default when you invoke "devi
15
15
  * Rememberable: manages generating and clearing token for remember the user from a saved cookie.
16
16
  * Trackable: tracks sign in count, timestamps and ip.
17
17
  * Validatable: creates all needed validations for email and password. It's totally optional, so you're able to to customize validations by yourself.
18
-
19
- And it also includes the optional modules:
20
-
21
- * Activatable: if you need to activate accounts by other means, which are not through confirmation, use this module.
22
18
  * Timeoutable: expires sessions without activity in a certain period of time.
19
+ * Lockable: takes care of locking an account based on the number of failed sign in attempts. Handles unlock via expire and email.
20
+ * Activatable: if you need to activate accounts by other means, which are not through confirmation, use this module.
23
21
 
24
22
  There's an example application using Devise at http://github.com/plataformatec/devise_example .
25
23
 
@@ -50,15 +48,23 @@ Run the generator:
50
48
 
51
49
  ruby script/generate devise_install
52
50
 
53
- And you're ready to go. The generator will install an initializer which describes Devise's configuration options. Be sure to take a look.
51
+ And you're ready to go. The generator will install an initializer which describes ALL Devise's configuration options, so be sure to take a look at it and the documentation as well:
52
+
53
+ http://rdoc.info/projects/plataformatec/devise
54
54
 
55
55
  == Basic Usage
56
56
 
57
- This is a walkthrough with all steps you need to setup a devise resource, including model, migration, route files, and optional configuration. You can also check out the *Generators* section below to help you start.
57
+ This is a walkthrough with all steps you need to setup a devise resource, including model, migration, route files, and optional configuration. You MUST also check out the *Generators* section below to help you start.
58
58
 
59
59
  Devise must be set up within the model (or models) you want to use, and devise routes must be created inside your config/routes.rb file.
60
60
 
61
- We're assuming here you want a User model. First of all you have to setup a migration with the following fields:
61
+ We're assuming here you want a User model with some modules, as outlined below:
62
+
63
+ class User < ActiveRecord::Base
64
+ devise :authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable
65
+ end
66
+
67
+ After you choose which modules to use, you need to setup your migrations. Luckily, devise has some helpers to save you from this boring work:
62
68
 
63
69
  create_table :users do |t|
64
70
  t.authenticatable
@@ -69,48 +75,22 @@ We're assuming here you want a User model. First of all you have to setup a migr
69
75
  t.timestamps
70
76
  end
71
77
 
72
- You may also want to add some indexes to improve performance:
73
-
74
- add_index :your_table, :email
75
- add_index :your_table, :confirmation_token # for confirmable
76
- add_index :your_table, :reset_password_token # for recoverable
77
-
78
- Now let's setup a User model adding the devise line:
79
-
80
- class User < ActiveRecord::Base
81
- devise :all
82
- end
83
-
84
- This will include the six default modules outlined at the beginning. You can exclude and remove any module at will:
85
-
86
- # Include timeout configuration
87
- devise :all, :timeoutable
88
-
89
- # Remove validations
90
- devise :all, :except => :validatable
91
-
92
78
  Remember that Devise don't rely on _attr_accessible_ or _attr_protected_ inside its modules, so be sure to setup what attributes are accessible or protected in your model.
93
79
 
94
- == Model configuration
95
-
96
- In addition to :except, you can provide :pepper, :stretches, :encryptor, :authentication_keys, :confirm_within, :remember_for and :timeout as options to devise method.
97
-
98
- All those options are described in "config/initializers/devise.rb", which is generated when you invoke `ruby script/generate devise_install` in your application root.
99
-
100
- == Routes
101
-
102
- The next step after setting up your model is to configure your routes for devise. You do this by opening up your config/routes.rb and adding:
80
+ The next setup after setting up your model is to configure your routes. You do this by opening up your config/routes.rb and adding:
103
81
 
104
82
  map.devise_for :users
105
83
 
106
84
  This is going to look inside you User model and create a set of needed routes (you can see them by running `rake routes`).
107
85
 
108
- There are also some options available for configuring your routes, as :class_name (to set the class for that route), :as and :path_names, where the last two have the same meaning as in common routes. The available :path_names are:
86
+ There are also some options available for configuring your routes, as :class_name (to set the class for that route), :path_prefix, :as and :path_names, where the last two have the same meaning as in common routes. The available :path_names are:
109
87
 
110
- map.devise_for :users, :as => "usuarios", :path_names => { :sign_in => 'login', :sign_out => 'logout', :password => 'secret', :confirmation => 'verification' }
88
+ map.devise_for :users, :as => "usuarios", :path_names => { :sign_in => 'login', :sign_out => 'logout', :password => 'secret', :confirmation => 'verification', :unlock => 'unblock' }
111
89
 
112
90
  Be sure to check devise_for documentation for detailed description.
113
91
 
92
+ After this steps, run your migrations, and you are ready to go! But don't finish reading, we still have a lot to tell you:
93
+
114
94
  == Controller filters and helpers
115
95
 
116
96
  Devise is gonna create some helpers to use inside your controllers and views. To setup a controller that needs user authentication, just add this before_filter:
@@ -129,32 +109,29 @@ You have also access to the session for this scope:
129
109
 
130
110
  user_session
131
111
 
132
- 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:
112
+ 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. This means that you need to set the root inside your routes:
133
113
 
134
114
  map.root :controller => 'home'
135
115
 
136
116
  You can also overwrite after_sign_in_path_for and after_sign_out_path_for to customize better your redirect hooks.
137
117
 
138
- Finally, if you are using confirmable or recoverable, you also need to setup default url options for the mailer in each environment. Here's is the configuration for config/environments/development.rb:
118
+ Finally, you also need to setup default url options for the mailer in each environment. Here's is the configuration for config/environments/development.rb:
139
119
 
140
120
  config.action_mailer.default_url_options = { :host => 'localhost:3000' }
141
121
 
142
- == Views
143
-
144
- By default devise will use the same views for all scopes/roles you have. But what if you need so different views to each of them? Devise also has an easy way to accomplish it: just setup config,scoped_views to true inside your devise config file, and you will be able to have views based on scope like 'sessions/users/new' and 'sessions/admin/new'. If no view is found within the scope, Devise will fallback to the default view.
145
-
146
122
  == Tidying up
147
123
 
148
- 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 just authentication, trackable and timeoutable stuff and none of confirmation or password recovery. Just follow the same steps:
124
+ 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 just authentication, trackable, lockable and timeoutable stuff and none of confirmation or password recovery. Just follow the same steps:
149
125
 
150
126
  # Create a migration with the required fields
151
127
  create_table :admins do |t|
152
128
  t.authenticatable
129
+ t.lockable
153
130
  t.trackable
154
131
  end
155
132
 
156
133
  # Inside your Admin model
157
- devise :authenticatable, :trackable, :timeoutable
134
+ devise :authenticatable, :trackable, :timeoutable, :lockable
158
135
 
159
136
  # Inside your routes
160
137
  map.devise_for :admin
@@ -179,11 +156,23 @@ This will generate an initializer, with a description of all configuration value
179
156
 
180
157
  A model configured with all devise modules and attr_accessible for default fields will be created. The generator will also create the migration and configure your routes for devise.
181
158
 
182
- You can also copy devise views to your application, being able to modify them based on your needs. To do it so, run the following command:
159
+ == Model configuration
160
+
161
+ The devise method in your models also accept some options to configure its modules. For example, you can chose which encryptor to use in authenticatable:
162
+
163
+ devise :authenticatable, :confirmable, :recoverable, :encryptor => :bcrypt
164
+
165
+ Besides :encryptor, you can provide :pepper, :stretches, :confirm_within, :remember_for, :timeout_in, :unlock_in and others. All those are describer in the initializer created when you invoke the devise_install generator describer above.
166
+
167
+ == Views
168
+
169
+ Since devise is an engine, it has all default views inside the gem. They are good to get you started, but you will want to customize them at some point. And Devise has a generator to make copy them all to your application:
183
170
 
184
171
  ruby script/generate devise_views
185
172
 
186
- This is gonna copy all session, password, confirmation and mailer views to your app/views folder.
173
+ By default Devise will use the same views for all roles you have. But what if you need so different views to each of them? Devise also has an easy way to accomplish it: just setup config.scoped_views to true inside "config/initializers/devise.rb".
174
+
175
+ After doing so you will be able to have views based on the scope like 'sessions/users/new' and 'sessions/admin/new'. If no view is found within the scope, Devise will fallback to the default view.
187
176
 
188
177
  == I18n
189
178
 
@@ -240,8 +229,7 @@ Devise implements encryption strategies for Clearance, Authlogic and Restful-Aut
240
229
 
241
230
  == Other ORMs
242
231
 
243
- Devise was made to work from scratch with ActiveRecord. However it currently supports DataMapper and MongoMapper as well.
244
- To use it, just set Devise.orm or configure it in the initialization file (which is created with devise_install).
232
+ Devise supports both ActiveRecord (default) and MongoMapper, and has experimental Datamapper supports (in a sense that Devise test suite does not run completely with Datamapper). To choose other ORM, you just need to configure it in the initializer file.
245
233
 
246
234
  == TODO
247
235
 
@@ -254,9 +242,7 @@ Please refer to TODO file.
254
242
 
255
243
  == Contributors
256
244
 
257
- * Marcelo Silveira (http://github.com/mhfs)
258
- * Cyril Mougel (http://github.com/shingara)
259
- * Jonas Grimfelt (http://github.com/grimen)
245
+ We have a long running list of contributors. Check them in the CHANGELOG or do `git shortlog -s -n` in the cloned repository.
260
246
 
261
247
  == Bugs and Feedback
262
248
 
data/Rakefile CHANGED
@@ -44,7 +44,7 @@ begin
44
44
  s.description = "Flexible authentication solution for Rails with Warden"
45
45
  s.authors = ['José Valim', 'Carlos Antônio']
46
46
  s.files = FileList["[A-Z]*", "{app,config,generators,lib}/**/*", "init.rb"]
47
- s.add_dependency("warden", "~> 0.8.1")
47
+ s.add_dependency("warden", "~> 0.9.0")
48
48
  end
49
49
 
50
50
  Jeweler::GemcutterTasks.new
data/TODO CHANGED
@@ -1,6 +1,4 @@
1
- * Make test run with DataMapper (ActiveRecord, MongoMapper)
1
+ * Make test run with DataMapper
2
2
  * Add Registerable support
3
3
  * Add http authentication support
4
- * Extract SessionSerializer tests from Authenticatable
5
- * Extract CookieSerializer tests from Authenticatable
6
4
  * Extract Activatable tests from Confirmable
@@ -1,33 +1,22 @@
1
1
  class ConfirmationsController < ApplicationController
2
- include Devise::Controllers::Helpers
3
-
4
- # GET /resource/confirmation/new
5
- def new
6
- build_resource
7
- render_with_scope :new
8
- end
9
-
10
- # POST /resource/confirmation
11
- def create
12
- self.resource = resource_class.send_confirmation_instructions(params[resource_name])
13
-
14
- if resource.errors.empty?
15
- set_flash_message :success, :send_instructions
16
- redirect_to new_session_path(resource_name)
17
- else
18
- render_with_scope :new
19
- end
20
- end
2
+ include Devise::Controllers::InternalHelpers
3
+ include Devise::Controllers::Common
21
4
 
22
5
  # GET /resource/confirmation?confirmation_token=abcdef
23
6
  def show
24
7
  self.resource = resource_class.confirm!(:confirmation_token => params[:confirmation_token])
25
8
 
26
9
  if resource.errors.empty?
27
- set_flash_message :success, :confirmed
10
+ set_flash_message :notice, :confirmed
28
11
  sign_in_and_redirect(resource_name, resource)
29
12
  else
30
13
  render_with_scope :new
31
14
  end
32
15
  end
16
+
17
+ protected
18
+
19
+ def send_instructions_with
20
+ :send_confirmation_instructions
21
+ end
33
22
  end
@@ -1,26 +1,9 @@
1
1
  class PasswordsController < ApplicationController
2
- include Devise::Controllers::Helpers
2
+ include Devise::Controllers::InternalHelpers
3
+ include Devise::Controllers::Common
3
4
 
4
5
  before_filter :require_no_authentication
5
6
 
6
- # GET /resource/password/new
7
- def new
8
- build_resource
9
- render_with_scope :new
10
- end
11
-
12
- # POST /resource/password
13
- def create
14
- self.resource = resource_class.send_reset_password_instructions(params[resource_name])
15
-
16
- if resource.errors.empty?
17
- set_flash_message :success, :send_instructions
18
- redirect_to new_session_path(resource_name)
19
- else
20
- render_with_scope :new
21
- end
22
- end
23
-
24
7
  # GET /resource/password/edit?reset_password_token=abcdef
25
8
  def edit
26
9
  self.resource = resource_class.new
@@ -33,10 +16,16 @@ class PasswordsController < ApplicationController
33
16
  self.resource = resource_class.reset_password!(params[resource_name])
34
17
 
35
18
  if resource.errors.empty?
36
- set_flash_message :success, :updated
19
+ set_flash_message :notice, :updated
37
20
  sign_in_and_redirect(resource_name, resource)
38
21
  else
39
22
  render_with_scope :edit
40
23
  end
41
24
  end
25
+
26
+ protected
27
+
28
+ def send_instructions_with
29
+ :send_reset_password_instructions
30
+ end
42
31
  end
@@ -1,24 +1,24 @@
1
1
  class SessionsController < ApplicationController
2
- include Devise::Controllers::Helpers
2
+ include Devise::Controllers::InternalHelpers
3
+ include Devise::Controllers::Common
3
4
 
4
5
  before_filter :require_no_authentication, :only => [ :new, :create ]
5
6
 
6
7
  # GET /resource/sign_in
7
8
  def new
8
9
  Devise::FLASH_MESSAGES.each do |message|
9
- set_now_flash_message :failure, message if params.try(:[], message) == "true"
10
+ set_now_flash_message :alert, message if params.try(:[], message) == "true"
10
11
  end
11
- build_resource
12
- render_with_scope :new
12
+ super
13
13
  end
14
14
 
15
15
  # POST /resource/sign_in
16
16
  def create
17
- if authenticate(resource_name)
18
- set_flash_message :success, :signed_in
19
- sign_in_and_redirect(resource_name)
17
+ if resource = authenticate(resource_name)
18
+ set_flash_message :notice, :signed_in
19
+ sign_in_and_redirect(resource_name, resource, true)
20
20
  else
21
- set_now_flash_message :failure, warden.message || :invalid
21
+ set_now_flash_message :alert, warden.message || :invalid
22
22
  build_resource
23
23
  render_with_scope :new
24
24
  end
@@ -26,7 +26,7 @@ class SessionsController < ApplicationController
26
26
 
27
27
  # GET /resource/sign_out
28
28
  def destroy
29
- set_flash_message :success, :signed_out if signed_in?(resource_name)
29
+ set_flash_message :notice, :signed_out if signed_in?(resource_name)
30
30
  sign_out_and_redirect(resource_name)
31
31
  end
32
32
 
@@ -0,0 +1,22 @@
1
+ class UnlocksController < ApplicationController
2
+ include Devise::Controllers::InternalHelpers
3
+ include Devise::Controllers::Common
4
+
5
+ # GET /resource/unlock?unlock_token=abcdef
6
+ def show
7
+ self.resource = resource_class.unlock!(:unlock_token => params[:unlock_token])
8
+
9
+ if resource.errors.empty?
10
+ set_flash_message :notice, :unlocked
11
+ sign_in_and_redirect(resource_name, resource)
12
+ else
13
+ render_with_scope :new
14
+ end
15
+ end
16
+
17
+ protected
18
+
19
+ def send_instructions_with
20
+ :send_unlock_instructions
21
+ end
22
+ end
@@ -11,6 +11,10 @@ class DeviseMailer < ::ActionMailer::Base
11
11
  setup_mail(record, :reset_password_instructions)
12
12
  end
13
13
 
14
+ def unlock_instructions(record)
15
+ setup_mail(record, :unlock_instructions)
16
+ end
17
+
14
18
  private
15
19
 
16
20
  # Configure default email options
@@ -40,7 +44,8 @@ class DeviseMailer < ::ActionMailer::Base
40
44
 
41
45
  def mailer_sender(mapping)
42
46
  if Devise.mailer_sender.is_a?(Proc)
43
- Devise.mailer_sender.call(mapping.name)
47
+ block_args = mapping.name if Devise.mailer_sender.arity > 0
48
+ Devise.mailer_sender.call(*block_args)
44
49
  else
45
50
  Devise.mailer_sender
46
51
  end
@@ -9,8 +9,4 @@
9
9
  <p><%= f.submit "Resend confirmation instructions" %></p>
10
10
  <% end %>
11
11
 
12
- <%= link_to "Sign in", new_session_path(resource_name) %><br />
13
-
14
- <%- if devise_mapping.recoverable? %>
15
- <%= link_to "Forgot password?", new_password_path(resource_name) %><br />
16
- <% end -%>
12
+ <%= render :partial => "shared/devise_links" %>
@@ -0,0 +1,7 @@
1
+ Hello <%= @resource.email %>!
2
+
3
+ Your account has been locked due to an excessive amount of unsuccessful sign in attempts.
4
+
5
+ Click the link below to unlock your account:
6
+
7
+ <%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %>
@@ -13,8 +13,4 @@
13
13
  <p><%= f.submit "Change my password" %></p>
14
14
  <% end %>
15
15
 
16
- <%= link_to "Sign in", new_session_path(resource_name) %><br />
17
-
18
- <%- if devise_mapping.confirmable? %>
19
- <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
20
- <% end -%>
16
+ <%= render :partial => "shared/devise_links" %>