app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def verify_logged_in
    logger.info("Session ID: #{session.id}")
    if Rails.cache.read("uid-#{session.id}").present?
      user_email = User.where(id: Rails.cache.read("uid-#{session.id}")).try(:first).try(:email)
      @signed_in = "Welcome #{user_email}" if user_email.present?
    end
  end
def verify_logged_in logger . info ( "Session ID: #{session.id}" ) if Rails . cache . read ( "uid-#{session.id}" ) . present? user_email = User . where ( id : Rails . cache . read ( "uid-#{session.id}" ) ) . try ( :first ) . try ( :email ) @signed_in = "Welcome #{user_email}" if user_email . present? end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .