authlogic_rails3_example
authlogic_rails3_example copied to clipboard
Problem getting to run with Rails 3
I'm pretty new to Rails so maybe I'm doing stuff wrong, but I'm trying to get this to run using Rails3 and Ruby 1.9.2-preview3.
I've updated the Gemfile to 3.0.0 (removed .beta)
and did bundle install to update things, but after running rake, I end up with a ton of errors that look like:
UserSessionController when no user is authenticated GET 'new' assigns a new user_session as @user_session
Failure/Error: @mock_user_session ||= mock_model(UserSession, stubs).as_null_object
The mock_model method can only accept as its first argument:
A String representing a Class that does not exist
A String representing a Class that extends ActiveModel::Naming
A Class that extends ActiveModel::Naming
Thanks for any help.
I got this working by manually extending the UserSessions from ActiveModel::Naming :
class UserSession < Authlogic::Session::Base
extend ActiveModel::Naming
end