0

I am trying to set some attributes in a before_action of a store with multi step checkout behaviour.

All the before_action does is set some attributes for session

session[:checkout_attributes] ||= {}

but after the first step I keep getting the following error.

<ActionDispatch::Request::Session:0x11f80 not yet loaded> *** NoMethodError Exception: undefined method key?' for nil:NilClass`

Any suggestions would be appreciated.

I tried force loading the session using session.send(:load!) but it did not help, it just gave the same error.

Jibran Usman
  • 93
  • 1
  • 5
  • It would help if you added more detail to your question and some actual code sample than just the one line that is getting the error. Also a stack trace would help. – Beartech Apr 25 '23 at 02:24

0 Answers0