class Current < ActiveSupport::CurrentAttributes attribute :session attribute :user_agent, :ip_address delegate :user, to: :session, allow_nil: true delegate :family, to: :user, allow_nil: true end