Я использую гем table_builder для отображения бронирований в представлении календаря, однако мне кажется, что что-то не хватает, так как вывод не создает таблицу и не обрабатывает данные из модели.
Бронирование / index.html.haml
%h2 Bookings
- calendar_for @bookings do |calendar|
= calendar.head('mon', 'tue', 'wed', 'thur', 'fri', 'sat', 'sun')
- calendar.day(:day_method => :wo_date) do |date, bookings|
= date.day
- bookings.each do |booking|
= booking.client.username
bookings_controller.rb
def index
@title = "Bookings"
@bookings = current_user.bookings.all
end
Вывод html
<h2>Bookings</h2>
<table><thead><tr>[["<th>mon</th>", "<th>tue</th>", "<th>wed</th>", "<th>thur</th>", "<th>fri</th>", "<th>sat</th>", "<th>sun</th>"]]</tr></thead>
<tbody><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr></tbody></table>
</div>
вид с торца
![The view](https://i.stack.imgur.com/D5Hg9.png)