I have the following code in my application helper.
route = ActionController::Routing::Routes.recognize_path(current_uri)
controller = route[:controller]
action = route[:action]
session['route']<< [controller.to_s,action.to_s]
I get the following error You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.<<
Some quick logging and I see that controller and action work just fine. Can you not create sessions in helpers?