BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
70bb976b
Commit
70bb976b
authored
Dec 09, 2013
by
Jeroen van Baarsen
Committed by
Dmitriy Zaporozhets
Dec 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the last deprecation warnings for order and where
parent
2a62aa45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
user.rb
app/models/user.rb
+3
-4
No files found.
app/models/user.rb
View file @
70bb976b
...
...
@@ -72,7 +72,7 @@ class User < ActiveRecord::Base
#
# Namespace for personal projects
has_one
:namespace
,
dependent: :destroy
,
foreign_key: :owner_id
,
class_name:
"Namespace"
,
conditions:
'type IS NULL'
has_one
:namespace
,
->
{
where
type:
nil
},
dependent: :destroy
,
foreign_key: :owner_id
,
class_name:
"Namespace"
# Profile
has_many
:keys
,
dependent: :destroy
...
...
@@ -80,8 +80,7 @@ class User < ActiveRecord::Base
# Groups
has_many
:users_groups
,
dependent: :destroy
has_many
:groups
,
through: :users_groups
has_many
:owned_groups
,
through: :users_groups
,
source: :group
,
conditions:
{
users_groups:
{
group_access:
UsersGroup
::
OWNER
}
}
has_many
:owned_groups
,
->
{
where
user_group:
{
group_access:
UsersGroup
::
OWNER
}
},
through: :users_groups
,
source: :group
# Projects
has_many
:groups_projects
,
through: :groups
,
source: :projects
has_many
:personal_projects
,
through: :namespace
,
source: :projects
...
...
@@ -94,7 +93,7 @@ class User < ActiveRecord::Base
has_many
:notes
,
dependent: :destroy
,
foreign_key: :author_id
has_many
:merge_requests
,
dependent: :destroy
,
foreign_key: :author_id
has_many
:events
,
dependent: :destroy
,
foreign_key: :author_id
,
class_name:
"Event"
has_many
:recent_events
,
foreign_key: :author_id
,
class_name:
"Event"
,
order:
"id DESC
"
has_many
:recent_events
,
->
{
order
"id DESC"
},
foreign_key: :author_id
,
class_name:
"Event
"
has_many
:assigned_issues
,
dependent: :destroy
,
foreign_key: :assignee_id
,
class_name:
"Issue"
has_many
:assigned_merge_requests
,
dependent: :destroy
,
foreign_key: :assignee_id
,
class_name:
"MergeRequest"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment