loyal_devise 2.1.7 → 2.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. data/README.md +16 -46
  2. data/app/controllers/devise/passwords_controller.rb +1 -1
  3. data/app/controllers/devise/registrations_controller.rb +1 -1
  4. data/lib/devise/controllers/helpers.rb +3 -6
  5. data/lib/devise/failure_app.rb +1 -8
  6. data/lib/devise/hooks/lockable.rb +1 -1
  7. data/lib/devise/mapping.rb +6 -6
  8. data/lib/devise/models/authenticatable.rb +4 -4
  9. data/lib/devise/models/confirmable.rb +4 -12
  10. data/lib/devise/models/database_authenticatable.rb +1 -1
  11. data/lib/devise/models/lockable.rb +1 -1
  12. data/lib/devise/models/recoverable.rb +2 -7
  13. data/lib/devise/models/rememberable.rb +1 -1
  14. data/lib/devise/{parameter_filter.rb → param_filter.rb} +1 -1
  15. data/lib/devise/parameter_sanitizer.rb +3 -3
  16. data/lib/devise/version.rb +1 -1
  17. data/lib/devise.rb +1 -1
  18. data/lib/generators/templates/README +1 -1
  19. data/lib/loyal_devise.rb +1 -0
  20. metadata +65 -301
  21. data/.gitignore +0 -12
  22. data/.travis.yml +0 -20
  23. data/.yardopts +0 -9
  24. data/CHANGELOG.rdoc +0 -936
  25. data/CONTRIBUTING.md +0 -14
  26. data/Gemfile +0 -31
  27. data/Gemfile.lock +0 -160
  28. data/devise.gemspec +0 -26
  29. data/devise.png +0 -0
  30. data/gemfiles/Gemfile.rails-3.2.x +0 -31
  31. data/gemfiles/Gemfile.rails-3.2.x.lock +0 -156
  32. data/loyal_devise.gemspec +0 -29
  33. data/test/controllers/custom_strategy_test.rb +0 -62
  34. data/test/controllers/helpers_test.rb +0 -253
  35. data/test/controllers/internal_helpers_test.rb +0 -120
  36. data/test/controllers/passwords_controller_test.rb +0 -32
  37. data/test/controllers/sessions_controller_test.rb +0 -85
  38. data/test/controllers/url_helpers_test.rb +0 -59
  39. data/test/delegator_test.rb +0 -19
  40. data/test/devise_test.rb +0 -83
  41. data/test/failure_app_test.rb +0 -221
  42. data/test/generators/active_record_generator_test.rb +0 -73
  43. data/test/generators/devise_generator_test.rb +0 -39
  44. data/test/generators/install_generator_test.rb +0 -13
  45. data/test/generators/mongoid_generator_test.rb +0 -23
  46. data/test/generators/views_generator_test.rb +0 -67
  47. data/test/helpers/devise_helper_test.rb +0 -51
  48. data/test/integration/authenticatable_test.rb +0 -699
  49. data/test/integration/confirmable_test.rb +0 -299
  50. data/test/integration/database_authenticatable_test.rb +0 -84
  51. data/test/integration/http_authenticatable_test.rb +0 -115
  52. data/test/integration/lockable_test.rb +0 -242
  53. data/test/integration/omniauthable_test.rb +0 -133
  54. data/test/integration/recoverable_test.rb +0 -335
  55. data/test/integration/registerable_test.rb +0 -349
  56. data/test/integration/rememberable_test.rb +0 -165
  57. data/test/integration/timeoutable_test.rb +0 -150
  58. data/test/integration/token_authenticatable_test.rb +0 -205
  59. data/test/integration/trackable_test.rb +0 -92
  60. data/test/mailers/confirmation_instructions_test.rb +0 -111
  61. data/test/mailers/reset_password_instructions_test.rb +0 -92
  62. data/test/mailers/unlock_instructions_test.rb +0 -87
  63. data/test/mapping_test.rb +0 -127
  64. data/test/models/authenticatable_test.rb +0 -13
  65. data/test/models/confirmable_test.rb +0 -443
  66. data/test/models/database_authenticatable_test.rb +0 -226
  67. data/test/models/lockable_test.rb +0 -273
  68. data/test/models/omniauthable_test.rb +0 -7
  69. data/test/models/recoverable_test.rb +0 -222
  70. data/test/models/registerable_test.rb +0 -7
  71. data/test/models/rememberable_test.rb +0 -175
  72. data/test/models/serializable_test.rb +0 -49
  73. data/test/models/timeoutable_test.rb +0 -46
  74. data/test/models/token_authenticatable_test.rb +0 -55
  75. data/test/models/trackable_test.rb +0 -13
  76. data/test/models/validatable_test.rb +0 -127
  77. data/test/models_test.rb +0 -163
  78. data/test/omniauth/config_test.rb +0 -57
  79. data/test/omniauth/url_helpers_test.rb +0 -54
  80. data/test/orm/active_record.rb +0 -10
  81. data/test/orm/mongoid.rb +0 -13
  82. data/test/parameter_sanitizer_test.rb +0 -51
  83. data/test/rails_app/Rakefile +0 -6
  84. data/test/rails_app/app/active_record/admin.rb +0 -6
  85. data/test/rails_app/app/active_record/shim.rb +0 -2
  86. data/test/rails_app/app/active_record/user.rb +0 -6
  87. data/test/rails_app/app/controllers/admins/sessions_controller.rb +0 -6
  88. data/test/rails_app/app/controllers/admins_controller.rb +0 -11
  89. data/test/rails_app/app/controllers/application_controller.rb +0 -9
  90. data/test/rails_app/app/controllers/home_controller.rb +0 -25
  91. data/test/rails_app/app/controllers/publisher/registrations_controller.rb +0 -2
  92. data/test/rails_app/app/controllers/publisher/sessions_controller.rb +0 -2
  93. data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +0 -14
  94. data/test/rails_app/app/controllers/users_controller.rb +0 -31
  95. data/test/rails_app/app/helpers/application_helper.rb +0 -3
  96. data/test/rails_app/app/mailers/users/mailer.rb +0 -12
  97. data/test/rails_app/app/mongoid/admin.rb +0 -29
  98. data/test/rails_app/app/mongoid/shim.rb +0 -23
  99. data/test/rails_app/app/mongoid/user.rb +0 -42
  100. data/test/rails_app/app/views/admins/index.html.erb +0 -1
  101. data/test/rails_app/app/views/admins/sessions/new.html.erb +0 -2
  102. data/test/rails_app/app/views/home/admin_dashboard.html.erb +0 -1
  103. data/test/rails_app/app/views/home/index.html.erb +0 -1
  104. data/test/rails_app/app/views/home/join.html.erb +0 -1
  105. data/test/rails_app/app/views/home/private.html.erb +0 -1
  106. data/test/rails_app/app/views/home/user_dashboard.html.erb +0 -1
  107. data/test/rails_app/app/views/layouts/application.html.erb +0 -24
  108. data/test/rails_app/app/views/users/edit_form.html.erb +0 -1
  109. data/test/rails_app/app/views/users/index.html.erb +0 -1
  110. data/test/rails_app/app/views/users/mailer/confirmation_instructions.erb +0 -1
  111. data/test/rails_app/app/views/users/sessions/new.html.erb +0 -1
  112. data/test/rails_app/bin/bundle +0 -3
  113. data/test/rails_app/bin/rails +0 -4
  114. data/test/rails_app/bin/rake +0 -4
  115. data/test/rails_app/config/application.rb +0 -40
  116. data/test/rails_app/config/boot.rb +0 -8
  117. data/test/rails_app/config/database.yml +0 -18
  118. data/test/rails_app/config/environment.rb +0 -5
  119. data/test/rails_app/config/environments/development.rb +0 -34
  120. data/test/rails_app/config/environments/production.rb +0 -84
  121. data/test/rails_app/config/environments/test.rb +0 -36
  122. data/test/rails_app/config/initializers/backtrace_silencers.rb +0 -7
  123. data/test/rails_app/config/initializers/devise.rb +0 -178
  124. data/test/rails_app/config/initializers/inflections.rb +0 -2
  125. data/test/rails_app/config/initializers/secret_token.rb +0 -8
  126. data/test/rails_app/config/initializers/session_store.rb +0 -1
  127. data/test/rails_app/config/routes.rb +0 -104
  128. data/test/rails_app/config.ru +0 -4
  129. data/test/rails_app/db/migrate/20100401102949_create_tables.rb +0 -74
  130. data/test/rails_app/db/schema.rb +0 -52
  131. data/test/rails_app/lib/shared_admin.rb +0 -14
  132. data/test/rails_app/lib/shared_user.rb +0 -25
  133. data/test/rails_app/public/404.html +0 -26
  134. data/test/rails_app/public/422.html +0 -26
  135. data/test/rails_app/public/500.html +0 -26
  136. data/test/rails_app/public/favicon.ico +0 -0
  137. data/test/routes_test.rb +0 -250
  138. data/test/support/assertions.rb +0 -40
  139. data/test/support/helpers.rb +0 -91
  140. data/test/support/integration.rb +0 -92
  141. data/test/support/locale/en.yml +0 -4
  142. data/test/support/webrat/integrations/rails.rb +0 -24
  143. data/test/test_helper.rb +0 -34
  144. data/test/test_helpers_test.rb +0 -151
  145. data/test/test_models.rb +0 -26
data/README.md CHANGED
@@ -57,7 +57,7 @@ You can view the Devise documentation in RDoc format here:
57
57
 
58
58
  http://rubydoc.info/github/plataformatec/devise/master/frames
59
59
 
60
- If you need to use Devise with previous versions of Rails, you can always run "gem server" from the command line after you install the gem to access the old documentation.
60
+ If you need to use Devise with Rails 2.3, you can always run "gem server" from the command line after you install the gem to access the old documentation.
61
61
 
62
62
  ### Example applications
63
63
 
@@ -90,7 +90,7 @@ Once you have solidified your understanding of Rails and authentication mechanis
90
90
 
91
91
  ## Getting started
92
92
 
93
- Devise 3.0 works with Rails 3.2 onwards. You can add it to your Gemfile with:
93
+ Devise 2.0 works with Rails 3.1 onwards. You can add it to your Gemfile with:
94
94
 
95
95
  ```ruby
96
96
  gem 'devise'
@@ -110,7 +110,7 @@ The generator will install an initializer which describes ALL Devise's configura
110
110
  rails generate devise MODEL
111
111
  ```
112
112
 
113
- Replace MODEL by the class name used for the applications users, it's frequently `User` but could also be `Admin`. This will create a model (if one does not exist) and configure it with default Devise modules. Next, you'll usually run `rake db:migrate` as the generator will have created a migration file (if your ORM supports them). This generator also configures your config/routes.rb file to point to the Devise controller.
113
+ Replace MODEL by the class name used for the applications users, it's frequently 'User' but could also be 'Admin'. This will create a model (if one does not exist) and configure it with default Devise modules. Next, you'll usually run "rake db:migrate" as the generator will have created a migration file (if your ORM supports them). This generator also configures your config/routes.rb file to point to the Devise controller.
114
114
 
115
115
  Note that you should re-start your app here if you've already started it. Otherwise you'll run into strange errors like users being unable to login and the route helpers being undefined.
116
116
 
@@ -200,32 +200,6 @@ class ApplicationController < ActionController::Base
200
200
  end
201
201
  ```
202
202
 
203
- If you have multiple roles, you may want to set up different parameter sanitizer per role. In this case, we recommend inheriting from `Devise::ParameterSanitizer` and add your own logic:
204
-
205
- ```ruby
206
- class User::ParameterSanitizer < Devise::ParameterSanitizer
207
- def sign_in
208
- default_params.permit(:username, :email)
209
- end
210
- end
211
- ```
212
-
213
- And then configure your controllers to use it:
214
-
215
- ```ruby
216
- class ApplicationController < ActionController::Base
217
- protected
218
-
219
- def devise_parameter_sanitizer
220
- if resource_class.is_a?(User)
221
- User::ParameterSanitizer.new(User, :user, params)
222
- else
223
- super # Use the default one
224
- end
225
- end
226
- end
227
- ```
228
-
229
203
  The example above overrides the permitted parameters for the user to be both `:username` and `:email`. The non-lazy way to configure parameters would be by defining the before filter above in a custom controller. We detail how to configure and customize controllers in some sections below.
230
204
 
231
205
  ### Configuring views
@@ -250,24 +224,22 @@ rails generate devise:views users
250
224
 
251
225
  If the customization at the views level is not enough, you can customize each controller by following these steps:
252
226
 
253
- 1. Create your custom controller, for example a `Admins::SessionsController`:
254
-
255
- ```ruby
256
- class Admins::SessionsController < Devise::SessionsController
257
- end
258
- ```
227
+ 1) Create your custom controller, for example a Admins::SessionsController:
259
228
 
260
- Note that in the above example, the controller needs to be created in the `app/controller/admins/` directory.
229
+ ```ruby
230
+ class Admins::SessionsController < Devise::SessionsController
231
+ end
232
+ ```
261
233
 
262
- 2. Tell the router to use this controller:
234
+ 2) Tell the router to use this controller:
263
235
 
264
- ```ruby
265
- devise_for :admins, :controllers => { :sessions => "admins/sessions" }
266
- ```
236
+ ```ruby
237
+ devise_for :admins, :controllers => { :sessions => "admins/sessions" }
238
+ ```
267
239
 
268
- 3. And since we changed the controller, it won't use the `"devise/sessions"` views, so remember to copy `"devise/sessions"` to `"admin/sessions"`.
240
+ 3) And since we changed the controller, it won't use the "devise/sessions" views, so remember to copy "devise/sessions" to "admin/sessions".
269
241
 
270
- Remember that Devise uses flash messages to let users know if sign in was successful or failed. Devise expects your application to call `"flash[:notice]"` and `"flash[:alert]"` as appropriate. Do not print the entire flash hash, print specific keys or at least remove the `:timedout` key from the hash as Devise adds this key in some circumstances, this key is not meant for display.
242
+ Remember that Devise uses flash messages to let users know if sign in was successful or failed. Devise expects your application to call "flash[:notice]" and "flash[:alert]" as appropriate. Do not print the entire flash hash, print specific keys or at least remove the `:timedout` key from the hash as Devise adds this key in some circumstances, this key is not meant for display.
271
243
 
272
244
  ### Configuring routes
273
245
 
@@ -359,14 +331,12 @@ sign_out @user # sign_out(resource)
359
331
 
360
332
  There are two things that is important to keep in mind:
361
333
 
362
- 1. These helpers are not going to work for integration tests driven by Capybara or Webrat. They are meant to be used with functional tests only. Instead, fill in the form or explicitly set the user in session;
334
+ 1) These helpers are not going to work for integration tests driven by Capybara or Webrat. They are meant to be used with functional tests only. Instead, fill in the form or explicitly set the user in session;
363
335
 
364
- 2. If you are testing Devise internal controllers or a controller that inherits from Devise's, you need to tell Devise which mapping should be used before a request. This is necessary because Devise gets this information from router, but since functional tests do not pass through the router, it needs to be told explicitly. For example, if you are testing the user scope, simply do:
336
+ 2) If you are testing Devise internal controllers or a controller that inherits from Devise's, you need to tell Devise which mapping should be used before a request. This is necessary because Devise gets this information from router, but since functional tests do not pass through the router, it needs to be told explicitly. For example, if you are testing the user scope, simply do:
365
337
 
366
- ```ruby
367
338
  @request.env["devise.mapping"] = Devise.mappings[:user]
368
339
  get :new
369
- ```
370
340
 
371
341
  ### Omniauth
372
342
 
@@ -53,7 +53,7 @@ class Devise::PasswordsController < DeviseController
53
53
  # Check if a reset_password_token is provided in the request
54
54
  def assert_reset_token_passed
55
55
  if params[:reset_password_token].blank?
56
- set_flash_message(:alert, :no_token)
56
+ set_flash_message(:error, :no_token)
57
57
  redirect_to new_session_path(resource_name)
58
58
  end
59
59
  end
@@ -10,7 +10,7 @@ class Devise::RegistrationsController < DeviseController
10
10
 
11
11
  # POST /resource
12
12
  def create
13
- build_resource(sign_up_params)
13
+ self.resource = build_resource(sign_up_params)
14
14
 
15
15
  if resource.save
16
16
  if resource.active_for_authentication?
@@ -272,12 +272,9 @@ module Devise
272
272
  # Overwrite Rails' handle unverified request to sign out all scopes,
273
273
  # clear run strategies and remove cached variables.
274
274
  def handle_unverified_request
275
- if sign_in?
276
- sign_out_all_scopes(false)
277
- request.env["devise.skip_storage"] = true
278
- expire_devise_cached_variables!
279
- end
280
-
275
+ sign_out_all_scopes(false)
276
+ request.env["devise.skip_storage"] = true
277
+ expire_devise_cached_variables!
281
278
  super # call the default behaviour which resets the session
282
279
  end
283
280
 
@@ -78,14 +78,7 @@ module Devise
78
78
  def redirect_url
79
79
  if warden_message == :timeout
80
80
  flash[:timedout] = true
81
-
82
- path = if request.get?
83
- attempted_path
84
- else
85
- request.referrer
86
- end
87
-
88
- path || scope_path
81
+ attempted_path || scope_path
89
82
  else
90
83
  scope_path
91
84
  end
@@ -2,6 +2,6 @@
2
2
  # This is only triggered when the user is explicitly set (with set_user)
3
3
  Warden::Manager.after_set_user :except => :fetch do |record, warden, options|
4
4
  if record.respond_to?(:failed_attempts) && warden.authenticated?(options[:scope])
5
- record.update_attribute(:failed_attempts, 0) unless record.failed_attempts.zero?
5
+ record.update_attribute(:failed_attempts, 0)
6
6
  end
7
7
  end
@@ -29,17 +29,17 @@ module Devise
29
29
 
30
30
  # Receives an object and find a scope for it. If a scope cannot be found,
31
31
  # raises an error. If a symbol is given, it's considered to be the scope.
32
- def self.find_scope!(obj)
33
- case obj
32
+ def self.find_scope!(duck)
33
+ case duck
34
34
  when String, Symbol
35
- return obj
35
+ return duck
36
36
  when Class
37
- Devise.mappings.each_value { |m| return m.name if obj <= m.to }
37
+ Devise.mappings.each_value { |m| return m.name if duck <= m.to }
38
38
  else
39
- Devise.mappings.each_value { |m| return m.name if obj.is_a?(m.to) }
39
+ Devise.mappings.each_value { |m| return m.name if duck.is_a?(m.to) }
40
40
  end
41
41
 
42
- raise "Could not find a valid mapping for #{obj.inspect}"
42
+ raise "Could not find a valid mapping for #{duck.inspect}"
43
43
  end
44
44
 
45
45
  def self.find_by_path!(path, path_type=:fullpath)
@@ -21,7 +21,7 @@ module Devise
21
21
  # as key on authentication. This can also be a hash where the value is a boolean specifying
22
22
  # if the value is required or not.
23
23
  #
24
- # * +http_authenticatable+: if this model allows http authentication. By default false.
24
+ # * +http_authenticatable+: if this model allows http authentication. By default true.
25
25
  # It also accepts an array specifying the strategies that should allow http.
26
26
  #
27
27
  # * +params_authenticatable+: if this model allows authentication through request params. By default true.
@@ -243,7 +243,7 @@ module Devise
243
243
  end
244
244
 
245
245
  def find_first_by_auth_conditions(tainted_conditions, opts={})
246
- to_adapter.find_first(devise_parameter_filter.filter(tainted_conditions).merge(opts))
246
+ to_adapter.find_first(devise_param_filter.filter(tainted_conditions).merge(opts))
247
247
  end
248
248
 
249
249
  # Find an initialize a record setting an error if it can't be found.
@@ -275,8 +275,8 @@ module Devise
275
275
 
276
276
  protected
277
277
 
278
- def devise_parameter_filter
279
- @devise_parameter_filter ||= Devise::ParameterFilter.new(case_insensitive_keys, strip_whitespace_keys)
278
+ def devise_param_filter
279
+ @devise_param_filter ||= Devise::ParamFilter.new(case_insensitive_keys, strip_whitespace_keys)
280
280
  end
281
281
 
282
282
  # Generate a token by looping and ensuring does not already exist.
@@ -93,7 +93,7 @@ module Devise
93
93
  self.confirmation_token = nil if reconfirmation_required?
94
94
  @reconfirmation_required = false
95
95
 
96
- ensure_confirmation_token!
96
+ generate_confirmation_token! if self.confirmation_token.blank?
97
97
 
98
98
  opts = pending_reconfirmation? ? { :to => unconfirmed_email } : { }
99
99
  send_devise_notification(:confirmation_instructions, opts)
@@ -106,11 +106,6 @@ module Devise
106
106
  send_confirmation_instructions
107
107
  end
108
108
  end
109
-
110
- # Generate a confirmation token unless already exists and save the record.
111
- def ensure_confirmation_token!
112
- generate_confirmation_token! if should_generate_confirmation_token?
113
- end
114
109
 
115
110
  # Overwrites active_for_authentication? for confirmation
116
111
  # by verifying whether a user is active to sign in or not. If the user
@@ -144,9 +139,6 @@ module Devise
144
139
  end
145
140
 
146
141
  protected
147
- def should_generate_confirmation_token?
148
- confirmation_token.nil? || confirmation_period_expired?
149
- end
150
142
 
151
143
  # A callback method used to deliver confirmation
152
144
  # instructions on creation. This can be overriden
@@ -235,17 +227,17 @@ module Devise
235
227
  end
236
228
 
237
229
  def postpone_email_change?
238
- postpone = self.class.reconfirmable && email_changed? && !@bypass_postpone && !self.email.blank?
230
+ postpone = self.class.reconfirmable && email_changed? && !@bypass_postpone
239
231
  @bypass_postpone = false
240
232
  postpone
241
233
  end
242
234
 
243
235
  def reconfirmation_required?
244
- self.class.reconfirmable && @reconfirmation_required && !self.email.blank?
236
+ self.class.reconfirmable && @reconfirmation_required
245
237
  end
246
238
 
247
239
  def send_confirmation_notification?
248
- confirmation_required? && !@skip_confirmation_notification && !self.email.blank?
240
+ confirmation_required? && !@skip_confirmation_notification
249
241
  end
250
242
 
251
243
  module ClassMethods
@@ -81,7 +81,7 @@ module Devise
81
81
  #
82
82
  # Example:
83
83
  #
84
- # def update_without_password(params, *options)
84
+ # def update_without_password(params={})
85
85
  # params.delete(:email)
86
86
  # super(params)
87
87
  # end
@@ -55,7 +55,7 @@ module Devise
55
55
 
56
56
  # Verifies whether a user is locked or not.
57
57
  def access_locked?
58
- !!locked_at && !lock_expired?
58
+ locked_at && !lock_expired?
59
59
  end
60
60
 
61
61
  # Send unlock instructions by email
@@ -44,15 +44,10 @@ module Devise
44
44
 
45
45
  # Resets reset password token and send reset password instructions by email
46
46
  def send_reset_password_instructions
47
- ensure_reset_password_token!
47
+ generate_reset_password_token! if should_generate_reset_token?
48
48
  send_devise_notification(:reset_password_instructions)
49
49
  end
50
-
51
- # Generate reset password token unless already exists and save the record.
52
- def ensure_reset_password_token!
53
- generate_reset_password_token! if should_generate_reset_token?
54
- end
55
-
50
+
56
51
  # Checks if the reset password token sent is within the limit time.
57
52
  # We do this by calculating if the difference between today and the
58
53
  # sending date does not exceed the confirm in time configured.
@@ -50,7 +50,7 @@ module Devise
50
50
  def remember_me!(extend_period=false)
51
51
  self.remember_token = self.class.remember_token if generate_remember_token?
52
52
  self.remember_created_at = Time.now.utc if generate_remember_timestamp?(extend_period)
53
- save(:validate => false) if self.changed?
53
+ save(:validate => false)
54
54
  end
55
55
 
56
56
  # If the record is persisted, remove the remember token (but only if
@@ -1,5 +1,5 @@
1
1
  module Devise
2
- class ParameterFilter
2
+ class ParamFilter
3
3
  def initialize(case_insensitive_keys, strip_whitespace_keys)
4
4
  @case_insensitive_keys = case_insensitive_keys || []
5
5
  @strip_whitespace_keys = strip_whitespace_keys || []
@@ -41,15 +41,15 @@ module Devise
41
41
  end
42
42
 
43
43
  def sign_in
44
- default_params.permit(*auth_keys)
44
+ default_params.permit(auth_keys)
45
45
  end
46
46
 
47
47
  def sign_up
48
- default_params.permit(*(auth_keys + [:password, :password_confirmation]))
48
+ default_params.permit(auth_keys + [:password, :password_confirmation])
49
49
  end
50
50
 
51
51
  def account_update
52
- default_params.permit(*(auth_keys + [:password, :password_confirmation, :current_password]))
52
+ default_params.permit(auth_keys + [:password, :password_confirmation, :current_password])
53
53
  end
54
54
 
55
55
  def auth_keys
@@ -1,3 +1,3 @@
1
1
  module Devise
2
- VERSION = "3.0.0.rc".freeze
2
+ VERSION = "2.2.4".freeze
3
3
  end
data/lib/devise.rb CHANGED
@@ -9,7 +9,7 @@ module Devise
9
9
  autoload :Delegator, 'devise/delegator'
10
10
  autoload :FailureApp, 'devise/failure_app'
11
11
  autoload :OmniAuth, 'devise/omniauth'
12
- autoload :ParameterFilter, 'devise/parameter_filter'
12
+ autoload :ParamFilter, 'devise/param_filter'
13
13
  autoload :BaseSanitizer, 'devise/parameter_sanitizer'
14
14
  autoload :ParameterSanitizer, 'devise/parameter_sanitizer'
15
15
  autoload :TestHelpers, 'devise/test_helpers'
@@ -21,7 +21,7 @@ Some setup you must do manually if you haven't yet:
21
21
  <p class="notice"><%= notice %></p>
22
22
  <p class="alert"><%= alert %></p>
23
23
 
24
- 4. If you are deploying on Heroku with Rails 3.2 only, you may want to set:
24
+ 4. If you are deploying Rails 3.1+ on Heroku, you may want to set:
25
25
 
26
26
  config.assets.initialize_on_precompile = false
27
27
 
@@ -0,0 +1 @@
1
+ require 'devise'