2012-09-16 07:44:54 -04:00
|
|
|
class Admin::TeamMembersController < AdminController
|
2011-10-09 00:36:38 +03:00
|
|
|
def edit
|
|
|
|
@admin_team_member = UsersProject.find(params[:id])
|
|
|
|
end
|
|
|
|
|
|
|
|
def update
|
|
|
|
@admin_team_member = UsersProject.find(params[:id])
|
|
|
|
|
2011-10-27 16:44:29 +03:00
|
|
|
if @admin_team_member.update_attributes(params[:team_member])
|
2012-02-11 19:56:18 +02:00
|
|
|
redirect_to [:admin, @admin_team_member.project], notice: 'Project Access was successfully updated.'
|
2011-10-27 16:44:29 +03:00
|
|
|
else
|
|
|
|
render action: "edit"
|
2011-10-09 00:36:38 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def destroy
|
|
|
|
@admin_team_member = UsersProject.find(params[:id])
|
|
|
|
@admin_team_member.destroy
|
|
|
|
|
2012-02-11 19:56:18 +02:00
|
|
|
redirect_to :back
|
2011-10-09 00:36:38 +03:00
|
|
|
end
|
|
|
|
end
|