
set_session_for fails with alternate persistence_token_field
Reported by jemminger | January 15th, 2009 @ 03:54 PM
I have :persistence_token_field => 'remember_token' in my User model. If I try to use set_session_for(@user) in a test, it fails with the error:
NoMethodError: undefined method persistence_token' for
#<User:0x48555a8>
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:260:in
method_missing'
c:/ruby/lib/ruby/gems/1.8/gems/authlogic-1.3.9/lib/authlogic/testing/test_unit_helpers.rb:19:in
set_session_for'
test/functional/accounts_controller_test.rb:10:in
setup'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb:59:in
`run'
Comments and changes to this ticket
-
Ben Johnson January 18th, 2009 @ 07:46 PM
- State changed from new to resolved
Thanks for letting me know about this. This is fixed, just update from the repo.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.