mongoid/mongo_session_store

Undefined method: session_store=

khueue opened this issue · 3 comments

Hi! Got this error when I followed the install instructions for Mongoid running Rails 3.0.3:

sample_app/config/initializers/session_store.rb:10:in <top (required)>': undefined methodsession_store=' for ActionController::Base:Class (NoMethodError)

I changed the line :

ActionController::Base.session_store = :mongoid_store

to:

NameOfMyApp::Application.config.session_store = :mongoid_store

Seems to be working now!

In Rails 3 you have to do NameOfYourApp::Application.config.session_store :mongoid_store without the "=" in config/initalizers/session_store.rb

Thnx @mschae ! I was knocking my head off why the hell it was not working.

Fixed in #13. Updated in README for version 3.