Improve CHANGELOG and move assignment to outside the `if` statement.

This commit is contained in:
Lucas Mazza 2014-04-28 11:28:48 -03:00
parent 13a8ad81ee
commit 1ad09f9cfc
2 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,7 @@
calling `super`
* Serialize the `last_request_at` entry as an Integer
* Ensure registration controller block yields happen on failure in addition to success (by @dpehrson)
* Storing location only for valid url (by @parallel588)
* Only valid paths will be stored for redirections (by @parallel588)
### 3.2.4

View File

@ -33,7 +33,8 @@ module Devise
#
def store_location_for(resource_or_scope, location)
session_key = stored_location_key_for(resource_or_scope)
if (uri = parse_uri(location))
uri = parse_uri(location)
if uri
session[session_key] = [uri.path.sub(/\A\/+/, '/'), uri.query].compact.join('?')
end
end