lib/merb/session/merb_memory_session.rb in merb-0.2.0 vs lib/merb/session/merb_memory_session.rb in merb-0.3.0
- old
+ new
@@ -2,17 +2,17 @@
module SessionMixin
def setup_session
MERB_LOGGER.info("Setting up session")
- before = @cookies[ancestral_trait[:session_id_key]]
- @session , @cookies[ancestral_trait[:session_id_key]] = Merb::MemorySession.persist(@cookies[ancestral_trait[:session_id_key]])
- @_new_cookie = @cookies[ancestral_trait[:session_id_key]] != before
+ before = @cookies[_session_id_key]
+ @session , @cookies[_session_id_key] = Merb::MemorySession.persist(@cookies[_session_id_key])
+ @_new_cookie = @cookies[_session_id_key] != before
end
def finalize_session
MERB_LOGGER.info("Finalize session")
- set_cookie(ancestral_trait[:session_id_key], @cookies[ancestral_trait[:session_id_key]], Time.now+Merb::Const::WEEK*2) if @_new_cookie
+ set_cookie(_session_id_key, @cookies[_session_id_key], Time.now+Merb::Const::WEEK*2) if @_new_cookie
end
end
class MemorySession
\ No newline at end of file