1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Change session restoration to allow namespaced models to be autoloaded. Closes #6348.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6054 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Nicholas Seckar 2007-01-28 06:19:07 +00:00
parent 35ec1c928f
commit b7df916249
2 changed files with 5 additions and 2 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Change session restoration to allow namespaced models to be autoloaded. Closes #6348. [Nicholas Seckar]
* Fix doubly appearing parameters due to string and symbol mixups. Closes #2551. [aeden]
* Fix overly greedy rescues when loading helpers. Fixes #6268. [Nicholas Seckar]

View file

@ -153,9 +153,10 @@ module ActionController #:nodoc:
def stale_session_check!
yield
rescue ArgumentError => argument_error
if argument_error.message =~ %r{undefined class/module ([\w:]+)}
if argument_error.message =~ %r{undefined class/module ([\w:]*\w)}
begin
Module.const_missing($1)
# Note that the regexp does not allow $1 to end with a ':'
$1.constantize
rescue LoadError, NameError => const_error
raise ActionController::SessionRestoreError, <<-end_msg
Session contains objects whose class definition isn\'t available.