Skip to content

Instantly share code, notes, and snippets.

@DimaD
Created August 10, 2009 14:27
Show Gist options
  • Save DimaD/165225 to your computer and use it in GitHub Desktop.
Save DimaD/165225 to your computer and use it in GitHub Desktop.
module Merb
module SessionMixin
module RequestMixin
def set_session_cookie_value(value, options = {})
defaults = Mash.new({:domain => Merb::Config[:default_cookie_domain]})
defaults[:expires] = Time.now + _session_expiry if _session_expiry > 0
cookies.set_cookie(_session_id_key, value, defaults.merge(options))
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment