User Session generation in Auth chapter
Reported by Ben Turner | January 2nd, 2012 @ 09:44 PM
Following the instructions in Chapter 14 (Auth), I ran the following commands:
rails generate model user
rails generate model user_session
...but then over the page, I saw that UserSession is not in fact an ActiveRecord::Base object, but an Authlogic::Session::Base object.
It would seem perhaps better to suggest the use of the generator specific to this gem. I note that the Railscast and main documentation of Authlogic point towards an older Rails2 style generator, but this blog post linked off the main Authlogic github wiki (http://tech.gregorymazurek.com/2011/01/03/rails-3-authlogic-could-n...) pointed me towards using the rails3-generators gem (which was already present but commented out in my default Gemfile, so presumably somewhat "standard" ?) which then provides the following instead :
rails genenerate Authlogic:session UserSession