Skip to content

Instantly share code, notes, and snippets.

@deepthawtz
Created March 17, 2009 07:04
Show Gist options
  • Select an option

  • Save deepthawtz/80376 to your computer and use it in GitHub Desktop.

Select an option

Save deepthawtz/80376 to your computer and use it in GitHub Desktop.
class Merb::BootLoader::MixinSession < Merb::BootLoader
# Mixin the session functionality; this is done before BeforeAppLoads
# so that SessionContainer and SessionStoreContainer can be subclassed by
# plugin session stores for example - these need to be loaded in a
# before_app_loads block or a BootLoader that runs after MixinSession.
#
# Note: access to Merb::Config is needed, so it needs to run after
# Merb::BootLoader::Dependencies is done.
#
# ==== Returns
# nil
#
# :api: plugin
def self.run
require 'merb-core/dispatch/session'
Merb::Controller.send(:include, ::Merb::SessionMixin)
Merb::Request.send(:include, ::Merb::SessionMixin::RequestMixin)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment