Ruby on Rails
- 3 ответа
- 0 вопросов
2
Вклад в тег
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
@grouped_entities = Entity.order('created_at DESC').group_by { |group| group.created_at.to_date }
<% @grouped_entities.each do |date, record_group| %>
<h1>date</h1>
<% record_group.each do |record| %>
<%= record.some_method_to_display %>
<% end %>
<% end %>