Quick Tech Tip - Rails & Authlogic

I was following along with the example project for getting AuthLogic setup on a Rails app, and almost immediately got this error when running UserSession.find

Couldn’t find User Session without an ID
After poking around a little bit, I realized that I accidentally set the UserSession model to inherit from the default ActiveRecord::Base rather than Authlogic::Session::Base.

Changing it to use the proper base class fixed the problem.


Copyright © 2018 - Scott Williams - Powered by Octopress