The markdown digest now includes the country code

This commit is contained in:
echarp 2017-05-27 14:42:51 +02:00
parent 1b64f9fb9a
commit 7de12f70c8

View File

@ -4,17 +4,9 @@
= t '.week', count: @events.count = t '.week', count: @events.count
\ \
- @events.group_by { |evt| evt.start_time.to_date }.sort.each do |day, evts|
* #{l day, format: :long}
- evts.each do |event|
\ * [**#{event.city}**] [#{event.title}](#{event_url event})
- second_part = capture_haml do - second_part = capture_haml do
= title
\=====
- @events.sort_by(&:start_time).each do |event| - @events.sort_by(&:start_time).each do |event|
[#{event.city}] [#{event.title}](#{event_url event}) - #{display_date event} [#{event.region.region.try(:code) || event.region.try(:code)} #{event.city}] [#{event.title}](#{event_url event}) - #{display_date event}
\----- \-----
- lines = strip_tags(event.description).split(/\r\n/).reject(&:blank?) - lines = strip_tags(event.description).split(/\r\n/).reject(&:blank?)