1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Add more docs, remove 3.0 related code, update CHANGELOG

This commit is contained in:
José Valim 2012-06-08 19:15:30 +02:00
parent 9327cf8af5
commit 6dd7ccee68
3 changed files with 23 additions and 6 deletions

View file

@ -1,3 +1,10 @@
* enhancements
* `Devise.omniauth_path_prefix` is available to configure omniauth path prefix
* Redirect to sign in page when trying to access password#edit without a token (by @gbataille)
* bug fix
* `update_with_password` now relies on assign_attributes and forwards the :as option (by @wtn)
* deprecations
* Strategy#validate() no longer validates nil resources

View file

@ -64,11 +64,7 @@ module Devise
result = if valid_password?(current_password)
update_attributes(params, *options)
else
if respond_to?(:assign_attributes)
self.assign_attributes(params, *options)
else
self.attributes = params
end
self.assign_attributes(params, *options)
self.valid?
self.errors.add(:current_password, current_password.blank? ? :blank : :invalid)
false

View file

@ -216,4 +216,18 @@ Devise.setup do |config|
# manager.intercept_401 = false
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
# end
end
# ==> Mountable engine configurations
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
# is mountable, there are some extra configurations to be taken into account.
# The following options are available, assuming the engine is mounted as:
#
# mount MyEngine, at: "/my_engine"
#
# The router that invoked `devise_for`, in the example above, would be:
# config.router_name = :my_engine
#
# When using omniauth, Devise cannot automatically set Omniauth path,
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = "/my_engine/users/auth"
end