Created
August 10, 2009 14:27
-
-
Save DimaD/165225 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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