Skip to content

Instantly share code, notes, and snippets.

@bnorton
Created August 26, 2015 05:34
Show Gist options
  • Save bnorton/c8ac332a542f2e98e823 to your computer and use it in GitHub Desktop.
Save bnorton/c8ac332a542f2e98e823 to your computer and use it in GitHub Desktop.
Skip the default Rails session (when building an API)
class ApplicationController < ActionController::Base
before_action :skip_session
private
def skip_session
request.session_options[:skip] = true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment