devise 3.2.3 → 3.2.4

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 (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/Gemfile +2 -2
  4. data/Gemfile.lock +6 -6
  5. data/README.md +7 -0
  6. data/Rakefile +1 -1
  7. data/app/controllers/devise/confirmations_controller.rb +2 -2
  8. data/app/controllers/devise/omniauth_callbacks_controller.rb +2 -2
  9. data/app/controllers/devise/passwords_controller.rb +3 -3
  10. data/app/controllers/devise/registrations_controller.rb +7 -7
  11. data/app/controllers/devise/sessions_controller.rb +6 -6
  12. data/app/controllers/devise/unlocks_controller.rb +2 -2
  13. data/app/controllers/devise_controller.rb +3 -3
  14. data/app/helpers/devise_helper.rb +2 -2
  15. data/app/views/devise/confirmations/new.html.erb +2 -2
  16. data/app/views/devise/mailer/confirmation_instructions.html.erb +1 -1
  17. data/app/views/devise/mailer/reset_password_instructions.html.erb +1 -1
  18. data/app/views/devise/mailer/unlock_instructions.html.erb +1 -1
  19. data/app/views/devise/passwords/edit.html.erb +3 -3
  20. data/app/views/devise/passwords/new.html.erb +2 -2
  21. data/app/views/devise/registrations/edit.html.erb +6 -6
  22. data/app/views/devise/registrations/new.html.erb +4 -4
  23. data/app/views/devise/sessions/new.html.erb +3 -3
  24. data/app/views/devise/unlocks/new.html.erb +2 -2
  25. data/devise.gemspec +1 -1
  26. data/gemfiles/Gemfile.rails-3.2-stable +3 -3
  27. data/gemfiles/Gemfile.rails-4.0-stable +3 -3
  28. data/gemfiles/Gemfile.rails-head +3 -3
  29. data/lib/devise.rb +3 -3
  30. data/lib/devise/controllers/helpers.rb +5 -5
  31. data/lib/devise/controllers/rememberable.rb +3 -3
  32. data/lib/devise/controllers/sign_in_out.rb +8 -8
  33. data/lib/devise/failure_app.rb +3 -3
  34. data/lib/devise/hooks/activatable.rb +1 -1
  35. data/lib/devise/hooks/lockable.rb +1 -1
  36. data/lib/devise/hooks/proxy.rb +1 -1
  37. data/lib/devise/hooks/rememberable.rb +1 -1
  38. data/lib/devise/hooks/timeoutable.rb +1 -1
  39. data/lib/devise/hooks/trackable.rb +1 -1
  40. data/lib/devise/mailers/helpers.rb +8 -8
  41. data/lib/devise/models/authenticatable.rb +3 -3
  42. data/lib/devise/models/confirmable.rb +9 -9
  43. data/lib/devise/models/database_authenticatable.rb +1 -1
  44. data/lib/devise/models/lockable.rb +6 -6
  45. data/lib/devise/models/omniauthable.rb +1 -1
  46. data/lib/devise/models/recoverable.rb +1 -1
  47. data/lib/devise/models/rememberable.rb +3 -3
  48. data/lib/devise/models/trackable.rb +1 -1
  49. data/lib/devise/models/validatable.rb +6 -6
  50. data/lib/devise/modules.rb +9 -9
  51. data/lib/devise/omniauth/url_helpers.rb +2 -2
  52. data/lib/devise/rails.rb +1 -1
  53. data/lib/devise/rails/routes.rb +81 -81
  54. data/lib/devise/test_helpers.rb +2 -2
  55. data/lib/devise/time_inflector.rb +1 -1
  56. data/lib/devise/version.rb +1 -1
  57. data/lib/generators/active_record/devise_generator.rb +6 -6
  58. data/lib/generators/active_record/templates/migration.rb +4 -4
  59. data/lib/generators/active_record/templates/migration_existing.rb +4 -4
  60. data/lib/generators/devise/devise_generator.rb +3 -3
  61. data/lib/generators/devise/views_generator.rb +29 -18
  62. data/lib/generators/mongoid/devise_generator.rb +19 -19
  63. data/lib/generators/templates/README +2 -2
  64. data/lib/generators/templates/devise.rb +9 -7
  65. data/lib/generators/templates/markerb/confirmation_instructions.markerb +1 -1
  66. data/lib/generators/templates/markerb/reset_password_instructions.markerb +1 -1
  67. data/lib/generators/templates/markerb/unlock_instructions.markerb +1 -1
  68. data/lib/generators/templates/simple_form_for/confirmations/new.html.erb +2 -2
  69. data/lib/generators/templates/simple_form_for/passwords/edit.html.erb +4 -4
  70. data/lib/generators/templates/simple_form_for/passwords/new.html.erb +2 -2
  71. data/lib/generators/templates/simple_form_for/registrations/edit.html.erb +6 -6
  72. data/lib/generators/templates/simple_form_for/registrations/new.html.erb +4 -4
  73. data/lib/generators/templates/simple_form_for/sessions/new.html.erb +4 -4
  74. data/lib/generators/templates/simple_form_for/unlocks/new.html.erb +2 -2
  75. data/test/controllers/helpers_test.rb +31 -31
  76. data/test/controllers/internal_helpers_test.rb +6 -6
  77. data/test/controllers/sessions_controller_test.rb +18 -18
  78. data/test/controllers/url_helpers_test.rb +4 -4
  79. data/test/delegator_test.rb +1 -1
  80. data/test/devise_test.rb +3 -3
  81. data/test/failure_app_test.rb +21 -21
  82. data/test/generators/active_record_generator_test.rb +4 -4
  83. data/test/generators/devise_generator_test.rb +2 -2
  84. data/test/generators/mongoid_generator_test.rb +1 -1
  85. data/test/generators/views_generator_test.rb +30 -1
  86. data/test/helpers/devise_helper_test.rb +11 -11
  87. data/test/integration/authenticatable_test.rb +42 -42
  88. data/test/integration/confirmable_test.rb +46 -46
  89. data/test/integration/database_authenticatable_test.rb +16 -16
  90. data/test/integration/http_authenticatable_test.rb +11 -11
  91. data/test/integration/lockable_test.rb +37 -37
  92. data/test/integration/omniauthable_test.rb +3 -3
  93. data/test/integration/recoverable_test.rb +41 -41
  94. data/test/integration/registerable_test.rb +49 -49
  95. data/test/integration/rememberable_test.rb +13 -13
  96. data/test/integration/timeoutable_test.rb +7 -7
  97. data/test/integration/trackable_test.rb +2 -2
  98. data/test/mailers/confirmation_instructions_test.rb +4 -4
  99. data/test/mailers/reset_password_instructions_test.rb +3 -3
  100. data/test/mailers/unlock_instructions_test.rb +2 -2
  101. data/test/models/authenticatable_test.rb +3 -3
  102. data/test/models/confirmable_test.rb +31 -31
  103. data/test/models/database_authenticatable_test.rb +27 -27
  104. data/test/models/lockable_test.rb +29 -29
  105. data/test/models/recoverable_test.rb +19 -19
  106. data/test/models/rememberable_test.rb +8 -8
  107. data/test/models/serializable_test.rb +8 -8
  108. data/test/models/timeoutable_test.rb +1 -1
  109. data/test/models/validatable_test.rb +11 -11
  110. data/test/omniauth/config_test.rb +3 -3
  111. data/test/omniauth/url_helpers_test.rb +3 -3
  112. data/test/parameter_sanitizer_test.rb +1 -1
  113. data/test/rails_app/app/controllers/admins_controller.rb +1 -1
  114. data/test/rails_app/app/controllers/application_controller.rb +2 -2
  115. data/test/rails_app/app/controllers/home_controller.rb +1 -1
  116. data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +2 -2
  117. data/test/rails_app/app/controllers/users_controller.rb +5 -5
  118. data/test/rails_app/app/mailers/users/mailer.rb +4 -4
  119. data/test/rails_app/app/mongoid/admin.rb +11 -11
  120. data/test/rails_app/app/mongoid/shim.rb +2 -2
  121. data/test/rails_app/app/mongoid/user.rb +19 -19
  122. data/test/rails_app/app/views/admins/sessions/new.html.erb +1 -1
  123. data/test/rails_app/app/views/layouts/application.html.erb +1 -1
  124. data/test/rails_app/config/application.rb +2 -2
  125. data/test/rails_app/config/initializers/devise.rb +3 -3
  126. data/test/rails_app/config/initializers/secret_token.rb +1 -1
  127. data/test/rails_app/config/routes.rb +43 -43
  128. data/test/rails_app/db/migrate/20100401102949_create_tables.rb +7 -7
  129. data/test/rails_app/lib/shared_admin.rb +4 -4
  130. data/test/routes_test.rb +59 -59
  131. data/test/support/helpers.rb +4 -4
  132. data/test/support/integration.rb +12 -12
  133. data/test/test_helpers_test.rb +3 -3
  134. data/test/test_models.rb +5 -5
  135. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: def6822e22bdfaf3e48e528c4ecf286adb289533
4
- data.tar.gz: f9c08a292e3425f6d04c61d8f76b8c5de088b6f4
3
+ metadata.gz: 945f04d5e1eb0fba69bad2306ea35b688b5ac12c
4
+ data.tar.gz: 1352fa7a3ec0a5fb8501acb9ecb96f7d37c4ff3a
5
5
  SHA512:
6
- metadata.gz: 9a39095ace12227203990507ff84b466e85c75e90b5a7c6cae9a71c7ccf560b0d3e851e393c0acacca3d0a258ac7d8dd82fd98e53cf81ab10664c4bfabd9a548
7
- data.tar.gz: bc9e9a7f106e439152b5dd72fcd95701fcc64a12c776c8a9d6fb3b295bb89ed70aacf943089a3f3f20570fe3158f475e0a894edb8ee5fdc01beb84a6303778a6
6
+ metadata.gz: a1cfe4a64c28c012fd650941736ae8c5fe2a21e7ab7e86edf55adb26560b26951120a9bc03629d6195807ce0ef4efee938922d5c71bd7f1540f6b1b5bb897cfe
7
+ data.tar.gz: f4b0dd7e301e6ecd1f76f83deb5e790b17002726398946f38c6679e61d8f3022129791600b785876f1b7afba47968d7d381d1943ba68c56cf2863f8d66e534da
@@ -1,5 +1,11 @@
1
1
  ### Unreleased
2
2
 
3
+ ### 3.2.4
4
+
5
+ * enchancements
6
+ * `bcrypt` dependency updated due https://github.com/codahale/bcrypt-ruby/pull/86.
7
+ * View generator now can generate specific views with the `-v` flag, like `rails g devise:views -v sessions` (by @kayline)
8
+
3
9
  ### 3.2.3
4
10
 
5
11
  * enhancements
@@ -170,6 +176,16 @@ Security announcement: http://blog.plataformatec.com.br/2013/01/security-announc
170
176
  * `update_with_password` doesn't change encrypted password when it is invalid (by @nashby)
171
177
  * Properly handle namespaced models on Active Record generator (by @nashby)
172
178
 
179
+ ### 2.1.4
180
+
181
+ * bugfix
182
+ * Do not confirm account after reset password
183
+
184
+ ### 2.1.3
185
+
186
+ * bugfix
187
+ * Require string conversion for all values
188
+
173
189
  ### 2.1.2
174
190
 
175
191
  * enhancements
data/Gemfile CHANGED
@@ -10,8 +10,8 @@ gem "rdoc"
10
10
  group :test do
11
11
  gem "omniauth-facebook"
12
12
  gem "omniauth-openid", "~> 1.0.1"
13
- gem "webrat", "0.7.3", :require => false
14
- gem "mocha", "~> 0.13.1", :require => false
13
+ gem "webrat", "0.7.3", require: false
14
+ gem "mocha", "~> 1.0.0", require: false
15
15
  end
16
16
 
17
17
  platforms :jruby do
@@ -12,8 +12,8 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- devise (3.2.3)
16
- bcrypt-ruby (~> 3.0)
15
+ devise (3.2.4)
16
+ bcrypt (~> 3.0)
17
17
  orm_adapter (~> 0.1)
18
18
  railties (>= 3.2.6, < 5)
19
19
  thread_safe (~> 0.1)
@@ -48,7 +48,7 @@ GEM
48
48
  tzinfo (~> 0.3.37)
49
49
  arel (4.0.0)
50
50
  atomic (1.1.12)
51
- bcrypt-ruby (3.1.2)
51
+ bcrypt (3.1.7)
52
52
  builder (3.1.4)
53
53
  erubis (2.7.0)
54
54
  faraday (0.8.8)
@@ -63,10 +63,10 @@ GEM
63
63
  mail (2.5.4)
64
64
  mime-types (~> 1.16)
65
65
  treetop (~> 1.4.8)
66
- metaclass (0.0.1)
66
+ metaclass (0.0.4)
67
67
  mime-types (1.23)
68
68
  minitest (4.7.5)
69
- mocha (0.13.3)
69
+ mocha (1.0.0)
70
70
  metaclass (~> 0.0.1)
71
71
  moped (1.5.1)
72
72
  multi_json (1.7.9)
@@ -148,7 +148,7 @@ DEPENDENCIES
148
148
  activerecord-jdbcsqlite3-adapter
149
149
  devise!
150
150
  jruby-openssl
151
- mocha (~> 0.13.1)
151
+ mocha (~> 1.0.0)
152
152
  mongoid!
153
153
  omniauth (~> 1.0.0)
154
154
  omniauth-facebook
data/README.md CHANGED
@@ -267,6 +267,13 @@ After doing so, you will be able to have views based on the role like `users/ses
267
267
  rails generate devise:views users
268
268
  ```
269
269
 
270
+ If you want to generate only a few set of views, like the ones for the `registrable` and `confirmable` module,
271
+ you can pass a list of modules to the generator with the `-v` flag.
272
+
273
+ ```console
274
+ rails generate devise:views -v registrations confirmations
275
+ ```
276
+
270
277
  ### Configuring controllers
271
278
 
272
279
  If the customization at the views level is not enough, you can customize each controller by following these steps:
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake/testtask'
4
4
  require 'rdoc/task'
5
5
 
6
6
  desc 'Default: run tests for all ORMs.'
7
- task :default => :test
7
+ task default: :test
8
8
 
9
9
  desc 'Run Devise tests for all ORMs.'
10
10
  task :pre_commit do
@@ -10,7 +10,7 @@ class Devise::ConfirmationsController < DeviseController
10
10
  yield resource if block_given?
11
11
 
12
12
  if successfully_sent?(resource)
13
- respond_with({}, :location => after_resending_confirmation_instructions_path_for(resource_name))
13
+ respond_with({}, location: after_resending_confirmation_instructions_path_for(resource_name))
14
14
  else
15
15
  respond_with(resource)
16
16
  end
@@ -25,7 +25,7 @@ class Devise::ConfirmationsController < DeviseController
25
25
  set_flash_message(:notice, :confirmed) if is_flashing_format?
26
26
  respond_with_navigational(resource){ redirect_to after_confirmation_path_for(resource_name, resource) }
27
27
  else
28
- respond_with_navigational(resource.errors, :status => :unprocessable_entity){ render :new }
28
+ respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :new }
29
29
  end
30
30
  end
31
31
 
@@ -2,11 +2,11 @@ class Devise::OmniauthCallbacksController < DeviseController
2
2
  prepend_before_filter { request.env["devise.skip_timeout"] = true }
3
3
 
4
4
  def passthru
5
- render :status => 404, :text => "Not found. Authentication passthru."
5
+ render status: 404, text: "Not found. Authentication passthru."
6
6
  end
7
7
 
8
8
  def failure
9
- set_flash_message :alert, :failure, :kind => OmniAuth::Utils.camelize(failed_strategy.name), :reason => failure_message
9
+ set_flash_message :alert, :failure, kind: OmniAuth::Utils.camelize(failed_strategy.name), reason: failure_message
10
10
  redirect_to after_omniauth_failure_path_for(resource_name)
11
11
  end
12
12
 
@@ -1,7 +1,7 @@
1
1
  class Devise::PasswordsController < DeviseController
2
2
  prepend_before_filter :require_no_authentication
3
3
  # Render the #edit only if coming from a reset password email link
4
- append_before_filter :assert_reset_token_passed, :only => :edit
4
+ append_before_filter :assert_reset_token_passed, only: :edit
5
5
 
6
6
  # GET /resource/password/new
7
7
  def new
@@ -14,7 +14,7 @@ class Devise::PasswordsController < DeviseController
14
14
  yield resource if block_given?
15
15
 
16
16
  if successfully_sent?(resource)
17
- respond_with({}, :location => after_sending_reset_password_instructions_path_for(resource_name))
17
+ respond_with({}, location: after_sending_reset_password_instructions_path_for(resource_name))
18
18
  else
19
19
  respond_with(resource)
20
20
  end
@@ -36,7 +36,7 @@ class Devise::PasswordsController < DeviseController
36
36
  flash_message = resource.active_for_authentication? ? :updated : :updated_not_active
37
37
  set_flash_message(:notice, flash_message) if is_flashing_format?
38
38
  sign_in(resource_name, resource)
39
- respond_with resource, :location => after_resetting_password_path_for(resource)
39
+ respond_with resource, location: after_resetting_password_path_for(resource)
40
40
  else
41
41
  respond_with resource
42
42
  end
@@ -1,6 +1,6 @@
1
1
  class Devise::RegistrationsController < DeviseController
2
- prepend_before_filter :require_no_authentication, :only => [ :new, :create, :cancel ]
3
- prepend_before_filter :authenticate_scope!, :only => [:edit, :update, :destroy]
2
+ prepend_before_filter :require_no_authentication, only: [ :new, :create, :cancel ]
3
+ prepend_before_filter :authenticate_scope!, only: [:edit, :update, :destroy]
4
4
 
5
5
  # GET /resource/sign_up
6
6
  def new
@@ -17,11 +17,11 @@ class Devise::RegistrationsController < DeviseController
17
17
  if resource.active_for_authentication?
18
18
  set_flash_message :notice, :signed_up if is_flashing_format?
19
19
  sign_up(resource_name, resource)
20
- respond_with resource, :location => after_sign_up_path_for(resource)
20
+ respond_with resource, location: after_sign_up_path_for(resource)
21
21
  else
22
22
  set_flash_message :notice, :"signed_up_but_#{resource.inactive_message}" if is_flashing_format?
23
23
  expire_data_after_sign_in!
24
- respond_with resource, :location => after_inactive_sign_up_path_for(resource)
24
+ respond_with resource, location: after_inactive_sign_up_path_for(resource)
25
25
  end
26
26
  else
27
27
  clean_up_passwords resource
@@ -48,8 +48,8 @@ class Devise::RegistrationsController < DeviseController
48
48
  :update_needs_confirmation : :updated
49
49
  set_flash_message :notice, flash_key
50
50
  end
51
- sign_in resource_name, resource, :bypass => true
52
- respond_with resource, :location => after_update_path_for(resource)
51
+ sign_in resource_name, resource, bypass: true
52
+ respond_with resource, location: after_update_path_for(resource)
53
53
  else
54
54
  clean_up_passwords resource
55
55
  respond_with resource
@@ -121,7 +121,7 @@ class Devise::RegistrationsController < DeviseController
121
121
 
122
122
  # Authenticates the current scope and gets the current resource from the session.
123
123
  def authenticate_scope!
124
- send(:"authenticate_#{resource_name}!", :force => true)
124
+ send(:"authenticate_#{resource_name}!", force: true)
125
125
  self.resource = send(:"current_#{resource_name}")
126
126
  end
127
127
 
@@ -1,7 +1,7 @@
1
1
  class Devise::SessionsController < DeviseController
2
- prepend_before_filter :require_no_authentication, :only => [ :new, :create ]
3
- prepend_before_filter :allow_params_authentication!, :only => :create
4
- prepend_before_filter :only => [ :create, :destroy ] { request.env["devise.skip_timeout"] = true }
2
+ prepend_before_filter :require_no_authentication, only: [ :new, :create ]
3
+ prepend_before_filter :allow_params_authentication!, only: :create
4
+ prepend_before_filter only: [ :create, :destroy ] { request.env["devise.skip_timeout"] = true }
5
5
 
6
6
  # GET /resource/sign_in
7
7
  def new
@@ -16,7 +16,7 @@ class Devise::SessionsController < DeviseController
16
16
  set_flash_message(:notice, :signed_in) if is_flashing_format?
17
17
  sign_in(resource_name, resource)
18
18
  yield resource if block_given?
19
- respond_with resource, :location => after_sign_in_path_for(resource)
19
+ respond_with resource, location: after_sign_in_path_for(resource)
20
20
  end
21
21
 
22
22
  # DELETE /resource/sign_out
@@ -44,10 +44,10 @@ class Devise::SessionsController < DeviseController
44
44
  methods = resource_class.authentication_keys.dup
45
45
  methods = methods.keys if methods.is_a?(Hash)
46
46
  methods << :password if resource.respond_to?(:password)
47
- { :methods => methods, :only => [:password] }
47
+ { methods: methods, only: [:password] }
48
48
  end
49
49
 
50
50
  def auth_options
51
- { :scope => resource_name, :recall => "#{controller_path}#new" }
51
+ { scope: resource_name, recall: "#{controller_path}#new" }
52
52
  end
53
53
  end
@@ -12,7 +12,7 @@ class Devise::UnlocksController < DeviseController
12
12
  yield resource if block_given?
13
13
 
14
14
  if successfully_sent?(resource)
15
- respond_with({}, :location => after_sending_unlock_instructions_path_for(resource))
15
+ respond_with({}, location: after_sending_unlock_instructions_path_for(resource))
16
16
  else
17
17
  respond_with(resource)
18
18
  end
@@ -27,7 +27,7 @@ class Devise::UnlocksController < DeviseController
27
27
  set_flash_message :notice, :unlocked if is_flashing_format?
28
28
  respond_with_navigational(resource){ redirect_to after_unlock_path_for(resource) }
29
29
  else
30
- respond_with_navigational(resource.errors, :status => :unprocessable_entity){ render :new }
30
+ respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :new }
31
31
  end
32
32
  end
33
33
 
@@ -30,7 +30,7 @@ class DeviseController < Devise.parent_controller.constantize
30
30
 
31
31
  # Returns a signed in resource from session (if one exists)
32
32
  def signed_in_resource
33
- warden.authenticate(:scope => resource_name)
33
+ warden.authenticate(scope: resource_name)
34
34
  end
35
35
 
36
36
  # Attempt to find the mapped route for devise based on request path
@@ -92,14 +92,14 @@ MESSAGE
92
92
  # Helper for use in before_filters where no authentication is required.
93
93
  #
94
94
  # Example:
95
- # before_filter :require_no_authentication, :only => :new
95
+ # before_filter :require_no_authentication, only: :new
96
96
  def require_no_authentication
97
97
  assert_is_devise_resource!
98
98
  return unless is_navigational_format?
99
99
  no_input = devise_mapping.no_input_strategies
100
100
 
101
101
  authenticated = if no_input.present?
102
- args = no_input.dup.push :scope => resource_name
102
+ args = no_input.dup.push scope: resource_name
103
103
  warden.authenticate?(*args)
104
104
  else
105
105
  warden.authenticated?(resource_name)
@@ -10,8 +10,8 @@ module DeviseHelper
10
10
 
11
11
  messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join
12
12
  sentence = I18n.t("errors.messages.not_saved",
13
- :count => resource.errors.count,
14
- :resource => resource.class.model_name.human.downcase)
13
+ count: resource.errors.count,
14
+ resource: resource.class.model_name.human.downcase)
15
15
 
16
16
  html = <<-HTML
17
17
  <div id="error_explanation">
@@ -1,10 +1,10 @@
1
1
  <h2>Resend confirmation instructions</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
 
6
6
  <div><%= f.label :email %><br />
7
- <%= f.email_field :email, :autofocus => true %></div>
7
+ <%= f.email_field :email, autofocus: true %></div>
8
8
 
9
9
  <div><%= f.submit "Resend confirmation instructions" %></div>
10
10
  <% end %>
@@ -2,4 +2,4 @@
2
2
 
3
3
  <p>You can confirm your account email through the link below:</p>
4
4
 
5
- <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @token) %></p>
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
4
 
5
- <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %></p>
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
6
6
 
7
7
  <p>If you didn't request this, please ignore this email.</p>
8
8
  <p>Your password won't change until you access the link above and create a new one.</p>
@@ -4,4 +4,4 @@
4
4
 
5
5
  <p>Click the link below to unlock your account:</p>
6
6
 
7
- <p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @token) %></p>
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
@@ -1,14 +1,14 @@
1
1
  <h2>Change your password</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
  <%= f.hidden_field :reset_password_token %>
6
6
 
7
7
  <div><%= f.label :password, "New password" %><br />
8
- <%= f.password_field :password, :autofocus => true %></div>
8
+ <%= f.password_field :password, autofocus: true, autocomplete: "off" %></div>
9
9
 
10
10
  <div><%= f.label :password_confirmation, "Confirm new password" %><br />
11
- <%= f.password_field :password_confirmation %></div>
11
+ <%= f.password_field :password_confirmation, autocomplete: "off" %></div>
12
12
 
13
13
  <div><%= f.submit "Change my password" %></div>
14
14
  <% end %>
@@ -1,10 +1,10 @@
1
1
  <h2>Forgot your password?</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
 
6
6
  <div><%= f.label :email %><br />
7
- <%= f.email_field :email, :autofocus => true %></div>
7
+ <%= f.email_field :email, autofocus: true %></div>
8
8
 
9
9
  <div><%= f.submit "Send me reset password instructions" %></div>
10
10
  <% end %>
@@ -1,29 +1,29 @@
1
1
  <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
 
6
6
  <div><%= f.label :email %><br />
7
- <%= f.email_field :email, :autofocus => true %></div>
7
+ <%= f.email_field :email, autofocus: true %></div>
8
8
 
9
9
  <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
10
10
  <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
11
11
  <% end %>
12
12
 
13
13
  <div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
14
- <%= f.password_field :password, :autocomplete => "off" %></div>
14
+ <%= f.password_field :password, autocomplete: "off" %></div>
15
15
 
16
16
  <div><%= f.label :password_confirmation %><br />
17
- <%= f.password_field :password_confirmation %></div>
17
+ <%= f.password_field :password_confirmation, autocomplete: "off" %></div>
18
18
 
19
19
  <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
20
- <%= f.password_field :current_password %></div>
20
+ <%= f.password_field :current_password, autocomplete: "off" %></div>
21
21
 
22
22
  <div><%= f.submit "Update" %></div>
23
23
  <% end %>
24
24
 
25
25
  <h3>Cancel my account</h3>
26
26
 
27
- <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %></p>
27
+ <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
28
28
 
29
29
  <%= link_to "Back", :back %>
@@ -1,16 +1,16 @@
1
1
  <h2>Sign up</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
 
6
6
  <div><%= f.label :email %><br />
7
- <%= f.email_field :email, :autofocus => true %></div>
7
+ <%= f.email_field :email, autofocus: true %></div>
8
8
 
9
9
  <div><%= f.label :password %><br />
10
- <%= f.password_field :password %></div>
10
+ <%= f.password_field :password, autocomplete: "off" %></div>
11
11
 
12
12
  <div><%= f.label :password_confirmation %><br />
13
- <%= f.password_field :password_confirmation %></div>
13
+ <%= f.password_field :password_confirmation, autocomplete: "off" %></div>
14
14
 
15
15
  <div><%= f.submit "Sign up" %></div>
16
16
  <% end %>
@@ -1,11 +1,11 @@
1
1
  <h2>Sign in</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
4
4
  <div><%= f.label :email %><br />
5
- <%= f.email_field :email, :autofocus => true %></div>
5
+ <%= f.email_field :email, autofocus: true %></div>
6
6
 
7
7
  <div><%= f.label :password %><br />
8
- <%= f.password_field :password %></div>
8
+ <%= f.password_field :password, autocomplete: "off" %></div>
9
9
 
10
10
  <% if devise_mapping.rememberable? -%>
11
11
  <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>