Sha256: fea9852215d29ea0b9ec604496c68af982433c07cdef7cbe3fbb6fce772424d6

Contents?: true

Size: 827 Bytes

Versions: 3

Compression:

Stored size: 827 Bytes

Contents

module Netzke
  module Core
    module Session
      # Access to controller sessions
      def session
        @@session ||= {}
      end

      def session=(s)
        @@session = s
      end

      # Should be called by session controller at the moment of successfull login
      def login
        session[:_netzke_next_request_is_first_after_login] = true
      end
  
      # Should be called by session controller at the moment of logout
      def logout
        session[:_netzke_next_request_is_first_after_logout] = true
      end

      # Register the configuration for the component in the session, and also remember that the code for it has been rendered
      def reg_component(config)
        session[:netzke_components] ||= {}
        session[:netzke_components][config[:name]] = config
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
netzke-core-0.6.2 lib/netzke/core/session.rb
netzke-core-0.6.1 lib/netzke/core/session.rb
netzke-core-0.6.0 lib/netzke/core/session.rb