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