factorize before_filters and layout for projects related controllers
This commit is contained in:
parent
0439387be0
commit
078a8f0e66
17 changed files with 33 additions and 101 deletions
|
@ -76,7 +76,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def project
|
||||
@project ||= current_user.projects.find_by_code(params[:project_id])
|
||||
@project ||= current_user.projects.find_by_code(params[:project_id] || params[:id])
|
||||
@project || render_404
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue