Skip to content

Instantly share code, notes, and snippets.

View KiranPanesar's full-sized avatar

Kiran Panesar KiranPanesar

View GitHub Profile
@KiranPanesar
KiranPanesar / session.rb
Last active April 22, 2019 21:57 — forked from bnorton/session.rb
Skip the default Rails session (when building an API)
class ApplicationController < ActionController::Base
before_action :skip_session
private
def skip_session
if request.format == :json
request.session_options[:skip] = true
end
end