method

find_by_token_for!

rails latest stable - Class: ActiveRecord::TokenFor::RelationMethods

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

find_by_token_for!(purpose, token)
public

Finds a record using a given token for a predefined purpose. Raises ActiveSupport::MessageVerifier::InvalidSignature if the token is invalid (e.g. expired, bad format, etc). Raises ActiveRecord::RecordNotFound if the token is valid but the record was not found.