#26 ✓resolved
jemminger

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

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.

New-ticket Create new ticket

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.

People watching this ticket

Tags

Pages