add users to project from admin area easily
This commit is contained in:
parent
fa8c0c7813
commit
c5a48a6a90
3 changed files with 40 additions and 39 deletions
|
@ -9,6 +9,12 @@ class Admin::ProjectsController < ApplicationController
|
|||
|
||||
def show
|
||||
@admin_project = Project.find_by_code(params[:id])
|
||||
|
||||
@users = if @admin_project.users.empty?
|
||||
User
|
||||
else
|
||||
User.not_in_project(@admin_project)
|
||||
end.all
|
||||
end
|
||||
|
||||
def new
|
||||
|
@ -19,11 +25,6 @@ class Admin::ProjectsController < ApplicationController
|
|||
@admin_project = Project.find_by_code(params[:id])
|
||||
end
|
||||
|
||||
def team
|
||||
@admin_project = Project.find_by_code(params[:id])
|
||||
@users = User.not_in_project(@admin_project).all
|
||||
end
|
||||
|
||||
def team_update
|
||||
@admin_project = Project.find_by_code(params[:id])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue