Sha256: 68c66d2f03a0eecf6400f92439c877ce12e432743832e74869c62144ba404fab
Contents?: true
Size: 750 Bytes
Versions: 53
Compression:
Stored size: 750 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim # A concern with the components needed when you want a model to be publicly shareable skipping authentication, # using a token with an expiration time. # module ShareableWithToken extend ActiveSupport::Concern included do has_many :share_tokens, class_name: "Decidim::ShareToken", foreign_type: "token_for_type", inverse_of: :token_for, as: :token_for, dependent: :destroy # Override this method in the included class with the public url for the shareable resource def shareable_url(_share_token) raise NotImplementedError end end end end
Version data entries
53 entries across 53 versions & 1 rubygems