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:
authorConnor Shea <connor.james.shea@gmail.com>2016-09-06 05:58:27 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-09-06 05:58:27 +0300
commitc7d717cf6a452afbf71158bddce78fdd29368d5b (patch)
tree6ab6bed7c83c06740c6421592a4a742c7bee17e2 /app/models/project.rb
parentad599eb65c8ce483a7faaffe226ec7ce53da0f55 (diff)
Fix two problematic bits of code that will be deprecated or broken in Rails 5.
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index a6de2c48071..4017cabe9f0 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -58,7 +58,7 @@ class Project < ActiveRecord::Base
# Relations
belongs_to :creator, foreign_key: 'creator_id', class_name: 'User'
- belongs_to :group, -> { where(type: Group) }, foreign_key: 'namespace_id'
+ belongs_to :group, -> { where(type: 'Group') }, foreign_key: 'namespace_id'
belongs_to :namespace
has_one :last_event, -> {order 'events.created_at DESC'}, class_name: 'Event', foreign_key: 'project_id'