Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
2a62aa45
Commit
2a62aa45
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 some deprecation warnings
parent
e5affcf1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app/models/project.rb
app/models/project.rb
+3
-3
No files found.
app/models/project.rb
View file @
2a62aa45
...
@@ -42,10 +42,10 @@ class Project < ActiveRecord::Base
...
@@ -42,10 +42,10 @@ class Project < ActiveRecord::Base
# Relations
# Relations
belongs_to
:creator
,
foreign_key:
"creator_id"
,
class_name:
"User"
belongs_to
:creator
,
foreign_key:
"creator_id"
,
class_name:
"User"
belongs_to
:group
,
foreign_key:
"namespace_id"
,
conditions:
"type = 'Group'
"
belongs_to
:group
,
->
{
where
(
type:
Group
)
},
foreign_key:
"namespace_id
"
belongs_to
:namespace
belongs_to
:namespace
has_one
:last_event
,
class_name:
'Event'
,
order:
'events.created_at DESC
'
,
foreign_key:
'project_id'
has_one
:last_event
,
->
{
order
'events.created_at DESC'
},
class_name:
'Event
'
,
foreign_key:
'project_id'
has_one
:gitlab_ci_service
,
dependent: :destroy
has_one
:gitlab_ci_service
,
dependent: :destroy
has_one
:campfire_service
,
dependent: :destroy
has_one
:campfire_service
,
dependent: :destroy
has_one
:pivotaltracker_service
,
dependent: :destroy
has_one
:pivotaltracker_service
,
dependent: :destroy
...
@@ -59,7 +59,7 @@ class Project < ActiveRecord::Base
...
@@ -59,7 +59,7 @@ class Project < ActiveRecord::Base
has_many
:events
,
dependent: :destroy
has_many
:events
,
dependent: :destroy
has_many
:merge_requests
,
dependent: :destroy
,
foreign_key:
"target_project_id"
has_many
:merge_requests
,
dependent: :destroy
,
foreign_key:
"target_project_id"
has_many
:fork_merge_requests
,
dependent: :destroy
,
foreign_key:
"source_project_id"
,
class_name:
MergeRequest
has_many
:fork_merge_requests
,
dependent: :destroy
,
foreign_key:
"source_project_id"
,
class_name:
MergeRequest
has_many
:issues
,
dependent: :destroy
,
order:
"state DESC, created_at DESC"
has_many
:issues
,
->
{
order
"state DESC, created_at DESC"
},
dependent: :destroy
has_many
:milestones
,
dependent: :destroy
has_many
:milestones
,
dependent: :destroy
has_many
:notes
,
dependent: :destroy
has_many
:notes
,
dependent: :destroy
has_many
:snippets
,
dependent: :destroy
,
class_name:
"ProjectSnippet"
has_many
:snippets
,
dependent: :destroy
,
class_name:
"ProjectSnippet"
...
...
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