Sha256: fdd05c405ee0c4c18ff4c6a6cded3f2a2538a17da22893d2bc78357a9b5c1ef9
Contents?: true
Size: 508 Bytes
Versions: 1
Compression:
Stored size: 508 Bytes
Contents
# frozen_string_literal: true module SimpleAuth module MagicLink class Model < ActiveRecord::Base include AttrKeyring.active_record self.table_name = "magic_links" attr_encrypt :code, :email def url url = Rails.application.routes.url_helpers.instance_eval(&MagicLink.url) SignedURL.call( url, key: MagicLink.keyring.current_key.encryption_key, expires: expires_at, params: {id:} ) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_auth-magic_link-0.0.2 | lib/simple_auth/magic_link/model.rb |