Created
October 29, 2010 06:59
-
-
Save abscondment/653049 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
before_filter :toggle_session | |
def toggle_session | |
# Disable the session if we spy a bot (or it was | |
# disabled elsewhere), enable otherwise. | |
if @disable_session.nil? | |
@disable_session = UrbanspoonUtil.is_megatron?(request.user_agent) | |
end | |
OptionalSessionStore.disabled = @disable_session | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment