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
c1583c6d
Commit
c1583c6d
authored
Aug 19, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find issues and Mr by iid in controller
parent
2e5481b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+1
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-1
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-1
No files found.
app/controllers/projects/issues_controller.rb
View file @
c1583c6d
...
@@ -91,7 +91,7 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -91,7 +91,7 @@ class Projects::IssuesController < Projects::ApplicationController
protected
protected
def
issue
def
issue
@issue
||=
@project
.
issues
.
find
(
params
[
:id
])
@issue
||=
@project
.
issues
.
find
_by_iid!
(
params
[
:id
])
end
end
def
authorize_modify_issue!
def
authorize_modify_issue!
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
c1583c6d
...
@@ -132,7 +132,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -132,7 +132,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
end
def
merge_request
def
merge_request
@merge_request
||=
@project
.
merge_requests
.
find
(
params
[
:id
])
@merge_request
||=
@project
.
merge_requests
.
find
_by_iid!
(
params
[
:id
])
end
end
def
authorize_modify_merge_request!
def
authorize_modify_merge_request!
...
...
app/controllers/projects_controller.rb
View file @
c1583c6d
...
@@ -104,7 +104,7 @@ class ProjectsController < Projects::ApplicationController
...
@@ -104,7 +104,7 @@ class ProjectsController < Projects::ApplicationController
def
autocomplete_sources
def
autocomplete_sources
@suggestions
=
{
@suggestions
=
{
emojis:
Emoji
.
names
,
emojis:
Emoji
.
names
,
issues:
@project
.
issues
.
select
([
:id
,
:title
,
:description
]),
issues:
@project
.
issues
.
select
([
:i
i
d
,
:title
,
:description
]),
members:
@project
.
team
.
members
.
sort_by
(
&
:username
).
map
{
|
user
|
{
username:
user
.
username
,
name:
user
.
name
}
}
members:
@project
.
team
.
members
.
sort_by
(
&
:username
).
map
{
|
user
|
{
username:
user
.
username
,
name:
user
.
name
}
}
}
}
...
...
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