module Redshop class ApplicationController < ActionController::Base protect_from_forgery with: :null_session before_action :check_session # Set uniq guest_id for cart_id and count_id. Theese ids will be use in the our application later. def check_session unless session[:guest_id] session[:guest_id] = SecureRandom.hex(6) end end end end