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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
5e131bca
Commit
5e131bca
authored
Jan 27, 2019
by
Camil Staps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure starred_since is of the requested project in StarrersController; cleanup
parent
38282685
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
13 deletions
+3
-13
app/controllers/projects/starrers_controller.rb
app/controllers/projects/starrers_controller.rb
+3
-1
app/views/shared/users/_user.html.haml
app/views/shared/users/_user.html.haml
+0
-12
No files found.
app/controllers/projects/starrers_controller.rb
View file @
5e131bca
...
...
@@ -13,7 +13,9 @@ class Projects::StarrersController < Projects::ApplicationController
params
[
:has_starred
]
=
@project
@starrers
=
UsersFinder
.
new
(
current_user
,
params
).
execute
@starrers
=
@starrers
.
joins
(
:users_star_projects
).
select
(
'"users".*, "users_star_projects"."created_at" as "starred_since"'
)
@starrers
=
@starrers
.
joins
(
:users_star_projects
)
.
select
(
'"users".*, "users_star_projects"."created_at" as "starred_since"'
)
.
where
(
users_star_projects:
{
project_id:
@project
.
project_id
})
@starrers
=
@starrers
.
sort_by_attribute
(
@sort
)
end
# rubocop: enable CodeReuse/ActiveRecord
...
...
app/views/shared/users/_user.html.haml
deleted
100644 → 0
View file @
38282685
-
user
=
local_assigns
.
fetch
(
:user
)
%li
.member
{
class:
dom_class
(
user
),
id:
dom_id
(
user
)
}
%span
.list-item-name
=
image_tag
avatar_icon_for_user
(
user
,
40
),
class:
"avatar s40"
,
alt:
''
.user-info
=
link_to
user
.
name
,
user_path
(
user
),
class:
'member js-user-link'
,
data:
{
user_id:
user
.
id
}
%br
%span
.cgray
=
user
.
to_reference
-
if
user
==
current_user
%span
.badge.badge-success.prepend-left-5
=
_
(
"It's you"
)
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