Skip to content
Snippets Groups Projects
Commit c1583c6d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Find issues and Mr by iid in controller

parent 2e5481b7
No related branches found
No related tags found
1 merge request!5081fixed command to update init script
Loading
Loading
@@ -91,7 +91,7 @@ class Projects::IssuesController < Projects::ApplicationController
protected
 
def issue
@issue ||= @project.issues.find(params[:id])
@issue ||= @project.issues.find_by_iid!(params[:id])
end
 
def authorize_modify_issue!
Loading
Loading
Loading
Loading
@@ -132,7 +132,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
 
def merge_request
@merge_request ||= @project.merge_requests.find(params[:id])
@merge_request ||= @project.merge_requests.find_by_iid!(params[:id])
end
 
def authorize_modify_merge_request!
Loading
Loading
Loading
Loading
@@ -104,7 +104,7 @@ class ProjectsController < Projects::ApplicationController
def autocomplete_sources
@suggestions = {
emojis: Emoji.names,
issues: @project.issues.select([:id, :title, :description]),
issues: @project.issues.select([:iid, :title, :description]),
members: @project.team.members.sort_by(&:username).map { |user| { username: user.username, name: user.name } }
}
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment