Fixing requests after namespaces. Fixed admin bug with access to project
This commit is contained in:
parent
e92b563acf
commit
0e1635a68a
14 changed files with 35 additions and 62 deletions
|
@ -42,4 +42,14 @@ class Admin::ProjectsController < AdminController
|
|||
|
||||
redirect_to projects_url, notice: 'Project was successfully deleted.'
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def project
|
||||
id = params[:project_id] || params[:id]
|
||||
id = id.split("/") if id.include?("/")
|
||||
|
||||
@project ||= Project.find_by_path(id)
|
||||
@project || render_404
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue