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:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 16:49:07 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 19:58:28 +0300
commitfc2c64fcdf913a37f987ab5e5626ef9bb9e8b854 (patch)
tree80517a6fa33f41b305449efbbff0df8ed50dd4f3 /app/models/issue.rb
parent2ed51e7e257aaacba650397cba3191415d032b00 (diff)
Add self.project_foreign_key on both Issue and MergeRequest
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index f7ccce2924a..133a5993815 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -138,6 +138,10 @@ class Issue < ActiveRecord::Base
reference.to_i > 0 && reference.to_i <= Gitlab::Database::MAX_INT_VALUE
end
+ def self.project_foreign_key
+ 'project_id'
+ end
+
def self.sort(method, excluded_labels: [])
case method.to_s
when 'due_date_asc' then order_due_date_asc