This project is archived and is in readonly mode.
rack.session.record too lazy
Reported by André Camargo | July 29th, 2010 @ 03:38 AM
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)
Comments and changes to this ticket
-
André Camargo July 29th, 2010 @ 04:02 PM
This is duplication of https://rails.lighthouseapp.com/projects/8994/tickets/5233-rails3-r... and Jose Valim fixed with https://rails.lighthouseapp.com/projects/8994/changesets/0f0bdaea7b...
I think this can be closed :-)
-
Mike Riley July 29th, 2010 @ 04:19 PM
- 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
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>