Sha256: 73eb6d530ebcbf363911785f0a258aeeaedb1db4c2d135a349b11b543a8aa0f6

Contents?: true

Size: 458 Bytes

Versions: 4

Compression:

Stored size: 458 Bytes

Contents

module Tasuku
  module Concerns::Models::Taskables::Verification
    extend ActiveSupport::Concern

    included do
      include ::Tasks::Taskables::Taskable

      belongs_to :verifiable, polymorphic: true
      has_many :confirmations, dependent: :destroy

      validates :verifiable_id, allow_blank: true, uniqueness: { scope: [:verifiable_type] }

      responses are: :confirmations

      def to_s
        verifiable.to_s
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tasuku-1.1.0 lib/tasuku/concerns/models/taskables/verification.rb
tasuku-1.0.1 lib/tasuku/concerns/models/taskables/verification.rb
tasuku-0.1.1 lib/tasuku/concerns/models/taskables/verification.rb
tasuku-0.1.0 lib/tasuku/concerns/models/taskables/verification.rb