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
806b76a1
Commit
806b76a1
authored
Feb 12, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename scope to prevent name collision
parent
4bf63212
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/controllers/public/projects_controller.rb
app/controllers/public/projects_controller.rb
+1
-1
app/models/project.rb
app/models/project.rb
+1
-1
No files found.
app/controllers/public/projects_controller.rb
View file @
806b76a1
...
@@ -6,7 +6,7 @@ class Public::ProjectsController < ApplicationController
...
@@ -6,7 +6,7 @@ class Public::ProjectsController < ApplicationController
layout
'public'
layout
'public'
def
index
def
index
@projects
=
Project
.
public
@projects
=
Project
.
public
_only
@projects
=
@projects
.
includes
(
:namespace
).
order
(
"namespaces.path, projects.name ASC"
).
page
(
params
[
:page
]).
per
(
20
)
@projects
=
@projects
.
includes
(
:namespace
).
order
(
"namespaces.path, projects.name ASC"
).
page
(
params
[
:page
]).
per
(
20
)
end
end
end
end
app/models/project.rb
View file @
806b76a1
...
@@ -91,7 +91,7 @@ class Project < ActiveRecord::Base
...
@@ -91,7 +91,7 @@ class Project < ActiveRecord::Base
scope
:sorted_by_activity
,
->
()
{
order
(
"(SELECT max(events.created_at) FROM events WHERE events.project_id = projects.id) DESC"
)
}
scope
:sorted_by_activity
,
->
()
{
order
(
"(SELECT max(events.created_at) FROM events WHERE events.project_id = projects.id) DESC"
)
}
scope
:personal
,
->
(
user
)
{
where
(
namespace_id:
user
.
namespace_id
)
}
scope
:personal
,
->
(
user
)
{
where
(
namespace_id:
user
.
namespace_id
)
}
scope
:joined
,
->
(
user
)
{
where
(
"namespace_id != ?"
,
user
.
namespace_id
)
}
scope
:joined
,
->
(
user
)
{
where
(
"namespace_id != ?"
,
user
.
namespace_id
)
}
scope
:public
,
->
{
where
(
public:
true
)
}
scope
:public
_only
,
->
{
where
(
public:
true
)
}
class
<<
self
class
<<
self
def
abandoned
def
abandoned
...
...
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