anchor.diff:      start_time = allocation.start_time.strftime('%H:%M').to_i
       rowspan = allocation.final_time.strftime('%H').to_i - start_time
     %>
  -    <p class="dataAllocation" data-day="<%= allocation.day %>" data-hour="<%= start_time %>" data-rowspan="<%= rowspan %>" data-id="<%= allocation.id %>">
  +    <p class="dataAllocation" data-day="<%= allocation.day %>" data-hour="<%= start_time %>" data-rowspan="<%= rowspan %>">
         <%= allocation.school_room.discipline.name %>
  -        <a href="!#" data-toggle="modal" data-target="#modalSchollRoom">
  +        <a href="#!" class="openModal" data-school-room="<%= allocation.school_room.id %>" data-courses="<% allocation.school_room.courses.each do |course| %><%= (course == allocation.school_room.courses.last ? course.name : "#{course.name}") %><% end %>" data-discipline="<%= allocation.school_room.discipline.name %>" data-vacancies="<%= allocation.school_room.vacancies %>" data-department="<%= allocation.school_room.discipline.department.name %>">
             <small>Turma: <%= allocation.school_room.name %></small>
           </a>
       </p>
  
positive.code:     </tr>
    </thead>
    <tbody>
      <% (6..23).each do |i| %>
        <tr>
          <th>
            <%= (i < 10 ? "0#{i}" : i) %>:00
          </th>
          <% days.each do |day| %>
            <td data-day-hour="<%= "#{day}#{i}" %>"></td>
          <% end %>
        </tr>
      <% end %>
  
negative.code:         }
        }
      });
      $('.openModal').on('click', function() {
        var school_room_id = $(this).attr('data-school-room');
        $('#schoolRoomTitle').text($(this).find('small').text());
        $('#itemCourse').text('Curso: ' + $(this).attr('data-courses'));
        $('#itemDepartment').text('Departamento: ' + $(this).attr('data-department'));
        $('#itemDiscipline').text('Disciplina: ' + $(this).attr('data-discipline'));
        $('#itemVacancies').text('vagas: ' + $(this).attr('data-vacancies'));
        // $.getJSON(
        //   url,
        //   { format: "json" },
        //   function(data) {
        //   }
        // );
        $('#modalSchollRoom').modal('show');
      });
    });
  </script>
  