diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-29 18:10:15 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-29 18:10:15 +0400 |
commit | 03654a6abf47c88b8b980a6707874ff78080d2fe (patch) | |
tree | c5ba2dba7f0685dd6c5e656a50f70400a746b23e /app/models/label_link.rb | |
parent | 535feb08ce90352c89799df5e3e70a10e53ee10d (diff) |
Label and LabelLink models for implementing own GitLab labels
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/label_link.rb')
-rw-r--r-- | app/models/label_link.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/label_link.rb b/app/models/label_link.rb new file mode 100644 index 00000000000..47bd6eaf35f --- /dev/null +++ b/app/models/label_link.rb @@ -0,0 +1,7 @@ +class LabelLink < ActiveRecord::Base + belongs_to :target, polymorphic: true + belongs_to :label + + validates :target, presence: true + validates :label, presence: true +end |