Sha256: 828f3f45a8bab721b9983b83c7f3f3d746d86bfff2af553d80826bfb863c2850

Contents?: true

Size: 267 Bytes

Versions: 2

Compression:

Stored size: 267 Bytes

Contents

module Tasuku
  module Concerns::Models::Requirables::InverseRequirable
    extend ActiveSupport::Concern

    included do
      belongs_to :task
      belongs_to :requirement, class_name: "Task"

      validates :task, :requirement, presence: true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tasuku-1.1.0 lib/tasuku/concerns/models/requirables/inverse_requirable.rb
tasuku-1.0.1 lib/tasuku/concerns/models/requirables/inverse_requirable.rb