Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

rack.session.record too lazy

#5237

I'm porting a Rails 1.1.6 :-) app to Rails3 that stores sessions in db.

In the old days, I used session.model to put some data in the sessions table.

Now I saw that session.model is deprecated in favour of request.env['rack.session.record']

But, it seems like http://github.com/rails/rails/commit/e210895ba95e498b9debbf43a3e5ae... broke my attached test.

Reverting the changes should solve the case, but, is this the right way?

Some information:

andre@amazonpc:~/rails/edge/actionpack$ rails -v
Rails 3.0.0.rc
andre@amazonpc:~/rails/edge/actionpack$ ruby -v
ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.02  
andre@amazonpc:~/rails/edge/actionpack$ rake test_active_record_integration
(in /home/andre/rails/edge/actionpack)
Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
.......F................................................................
Finished in 9.356048 seconds.

  1) Failure:
test_rack_session_record_presence(ActiveRecordStoreTest)
    [./test/activerecord/active_record_store_test.rb:78:in `test_rack_session_record_presence'
     ./test/activerecord/active_record_store_test.rb:223:in `with_test_route_set'
     ./test/abstract_unit.rb:214:in `with_routing'
     ./test/activerecord/active_record_store_test.rb:213:in `with_test_route_set'
     ./test/activerecord/active_record_store_test.rb:75:in `test_rack_session_record_presence'
     /home/andre/rails/edge/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /home/andre/rails/edge/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'
     /home/andre/rails/edge/activesupport/lib/active_support/callbacks.rb:423:in `_run_setup_callbacks'
     /home/andre/rails/edge/activesupport/lib/active_support/testing/setup_and_teardown.rb:65:in `run']:
<"ActiveRecord::SessionStore::Session"> expected but was
<"NilClass">.

72 tests, 141 assertions, 1 failures, 0 errors
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -I"lib:test" "/usr/loc...]

(See full trace by running task with --trace)

Reported by André Camargo · July 29th, 2010 @ 03:38 AM

State: resolved
Milestone: none
Assigned to: Aaron Patterson Aaron Patterson
Importance: Low

Activity

  1. André Camargo
  2. Mike Riley
    Mike Riley
    • State changed from new to resolved
    • Importance changed from to Low

    Hello Andre,

    I'll close this out as requested. If this is still valid or if you have more issues with it, feel free to reopen this.

    Mike Riley

    July 29th, 2010 @ 04:19 PM