I am logging web visits with a before_filter on the application
controller. The issue I'm having is that the initial visit does not
return a session id. I'm using the SqlSessionStore and the function
MysqlSession.find_session(session.session_id) to retrieve the session
id. If it doesn't exist I use a -1. So looking in my visits table the
initial visit always has -1 for the session id and the rest of the
visits contain a valid session id for that visitor.
I tried putting the logging of visits in the after filter but that
didn't seem to work. Is this something that I can correct or is that
just the way it is with sessions?