Commit b43214c5 authored by Timothy Andrew's avatar Timothy Andrew

Add a uniqueness constraint to `MergeRequestsClosingIssues`

parent 204419e9
class MergeRequestsClosingIssues < ActiveRecord::Base
belongs_to :merge_request
belongs_to :issue
validates_uniqueness_of :merge_request_id, scope: :issue_id
validates_presence_of :merge_request
validates_presence_of :issue
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment