Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-10-12 17:42:14 +0300
committerMarin Jankovski <maxlazio@gmail.com>2015-11-16 14:39:13 +0300
commit14032d8eb1a60ae5920286249c1044be2fa27278 (patch)
tree78d27cfb47590f5c30b1ae75de60368c5e269cc9 /app/models/lfs_objects_project.rb
parent9179fcece813d0fe54abb5d7a28874cfa799f9c5 (diff)
Add support for git lfs.
Diffstat (limited to 'app/models/lfs_objects_project.rb')
-rw-r--r--app/models/lfs_objects_project.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/lfs_objects_project.rb b/app/models/lfs_objects_project.rb
new file mode 100644
index 00000000000..0fd5f089db9
--- /dev/null
+++ b/app/models/lfs_objects_project.rb
@@ -0,0 +1,8 @@
+class LfsObjectsProject < ActiveRecord::Base
+ belongs_to :project
+ belongs_to :lfs_object
+
+ validates :lfs_object_id, presence: true
+ validates :lfs_object_id, uniqueness: { scope: [:project_id], message: "already exists in project" }
+ validates :project_id, presence: true
+end