Skip to content

Instantly share code, notes, and snippets.

@jqr
Created September 27, 2009 18:07
Show Gist options
  • Save jqr/194895 to your computer and use it in GitHub Desktop.
Save jqr/194895 to your computer and use it in GitHub Desktop.
prepend_before_filter :set_session_cookie_options
# A hack for using expire_after in Rails before 2.3
def set_session_cookie_options
self.class.session_options[:session_expires] = self.class.session_options[:expire_after].from_now
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment