lib/plezi/handlers/controller_magic.rb in plezi-0.11.1 vs lib/plezi/handlers/controller_magic.rb in plezi-0.11.2

- old
+ new

@@ -44,10 +44,10 @@ # # The first time this method is called, the session object will be created. The session object must be created BEFORE the headers are set , if it is to be used. # # Sessions are not automatically created, because they require more resources. The one exception is the Websocket connection that will force a session object into existence, as it's very common to use session data in Websocket connections and the extra connection time is less relevant for a long term connection. def session - response.session + @session ||= response.session end # the HTTPResponse **OR** the WSResponse object that formats the response and sends it. use `response << data`. This object can be used to send partial data (such as headers, or partial html content) in blocking mode as well as sending data in the default non-blocking mode. attr_reader :response