Sha256: 2c5b3dd11ebf1f9bbf1a6f33072e0e526459e4bf881c84a9b6c0da828ce1c944
Contents?: true
Size: 532 Bytes
Versions: 11
Compression:
Stored size: 532 Bytes
Contents
module SocialNetworking module Concerns # Rescues exception when authenticity token has expired module InvalidAuthToken extend ActiveSupport::Concern included do rescue_from ActionController::InvalidAuthenticityToken, with: :invalid_auth_token_redirect end private def invalid_auth_token_redirect redirect_to "/", alert: "Your authenticity token expired. "\ "Please try again." end end end end
Version data entries
11 entries across 11 versions & 1 rubygems