Sha256: 8e4062c2b32c23797627b5d631052798783ebad51e543d36bc6c8eb72360645f

Contents?: true

Size: 431 Bytes

Versions: 1

Compression:

Stored size: 431 Bytes

Contents

module Tasuku
  module Concerns::Models::Taskables::Taskable::Response
    extend ActiveSupport::Concern

    included do
      self.table_name = 'tasuku_taskables_taskable_responses'

      belongs_to :author, polymorphic: true
      belongs_to :submittable, polymorphic: true
      belongs_to :task

      before_destroy :destroy_submittable

      def destroy_submittable
        submittable.destroy
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tasuku-1.1.0 lib/tasuku/concerns/models/taskables/taskable/response.rb