Skip to content

Commit

Permalink
A team name may be updated by member students
Browse files Browse the repository at this point in the history
  • Loading branch information
akofink committed Mar 31, 2014
1 parent c588c6a commit 1c29dd5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/student_team_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def leave
if other_members.count == 0
old_team = AssignmentTeam.where( ['id = ?', params[:team_id]])
if old_team
old_team.delete
old_team.destroy_all
#if assignment has signup sheet then the topic selected by the team has to go back to the pool
#or to the first team in the waitlist
signups = SignedUpUser.where( {:creator_id => params[:team_id]})
Expand Down
5 changes: 5 additions & 0 deletions app/controllers/versions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@ def revert
redirect_to :back
end

private

def action_allowed?
true
end
end
2 changes: 1 addition & 1 deletion app/views/student_team/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<H1>Edit Team</H1>
<%= form_tag :action => 'update' do %>
<%= form_tag '/student_team/update', method: :put do %>
<%= hidden_field_tag 'team_id', @team.id %>
<%= hidden_field_tag 'student_id', @student.id %>
<label for="team_name">Team Name:</label>&nbsp;
Expand Down

0 comments on commit 1c29dd5

Please sign in to comment.