Skip to content

Commit

Permalink
removed instance variable assignmnet, used directly in view
Browse files Browse the repository at this point in the history
  • Loading branch information
juanbenavid committed Oct 26, 2022
1 parent 4684f83 commit b5636bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion app/controllers/signup_sheet_controller.rb
Expand Up @@ -168,7 +168,6 @@ def compute_signed_up_topics
def list
@participant = AssignmentParticipant.find(params[:id].to_i)
@assignment = @participant.assignment
@max_team_size = @assignment.max_team_size
@signup_topics = SignUpTopic.where(assignment_id: @assignment.id, private_to: nil)
@show_actions = true
@priority = 0
Expand Down
6 changes: 3 additions & 3 deletions app/views/signup_sheet/intelligent_topic_selection.html.erb
Expand Up @@ -23,7 +23,7 @@
<tbody id="topics" class="connectedSortable">
<tr class="sort-disabled"><td></td><td></td></tr>
<% for topic in @signup_topics %>
<%= get_intelligent_topic_row(topic, @selected_topics, @max_team_size) %>
<%= get_intelligent_topic_row(topic, @selected_topics, @assignment.max_team_size) %>
<% is_suggested_topic = false %>
<%= render :partial => 'table_line', :locals => {:i=>i, :topic=>topic, :is_suggested_topic=>is_suggested_topic} %>
</tr>
Expand All @@ -39,7 +39,7 @@
<tbody id="selections" data-update-url=<%= "/signup_sheet/set_priority?participant_id=#{@participant.id}" %> class="connectedSortable">
<tr class="sort-disabled"><td></td><td></td></tr>
<% for topic in @bids %>
<tr style= "background-color:<%= get_topic_bg_color(topic, @max_team_size) %>" id="topic_<%= topic.id %>">
<tr style= "background-color:<%= get_topic_bg_color(topic, @assignment.max_team_size) %>" id="topic_<%= topic.id %>">
<%= render :partial => 'table_line', :locals => {:i=>i, :topic=>topic, :is_suggested_topic=>is_suggested_topic} %>
</tr>
<% i=i+1 %>
Expand All @@ -58,4 +58,4 @@
<a href="javascript:history.back()">Back</a>
<br/>
</div>
</div>
</div>

0 comments on commit b5636bb

Please sign in to comment.