Rapide correction, pour que les lambdas passent sous ruby 1.9
This commit is contained in:
parent
3873317c24
commit
19cad28955
@ -19,9 +19,9 @@
|
|||||||
- params[:start_date] = "#{params[:year]}-#{i}-01"
|
- params[:start_date] = "#{params[:year]}-#{i}-01"
|
||||||
|
|
||||||
= month_calendar events: @events,
|
= month_calendar events: @events,
|
||||||
title: -> (start_date) { raw link_to I18n.t('date.month_names')[start_date.month]+' '+params[:year], root_url( start_date: start_date), class: 'month_selector' },
|
title: ->(start_date) { raw link_to I18n.t('date.month_names')[start_date.month]+' '+params[:year], root_url( start_date: start_date), class: 'month_selector' },
|
||||||
previous_link: -> (param, date_range) { },
|
previous_link: ->(param, date_range) { },
|
||||||
next_link: -> (param, date_range) { } do |date, events|
|
next_link: ->(param, date_range) { } do |date, events|
|
||||||
.day_number= date.day
|
.day_number= date.day
|
||||||
%ul.events
|
%ul.events
|
||||||
- events.select { |e| e.start_time.to_date <= date and date <= e.end_time.to_date }.sort_by { |e| e.city }.each do |event|
|
- events.select { |e| e.start_time.to_date <= date and date <= e.end_time.to_date }.sort_by { |e| e.city }.each do |event|
|
||||||
@ -32,9 +32,9 @@
|
|||||||
|
|
||||||
- else
|
- else
|
||||||
= month_calendar events: @events,
|
= month_calendar events: @events,
|
||||||
title: -> (start_date) { raw "#{I18n.t('date.month_names')[start_date.month]} #{link_to start_date.year, root_url( year: start_date.year), class: 'year_selector'}" },
|
title: ->(start_date) { raw "#{I18n.t('date.month_names')[start_date.month]} #{link_to start_date.year, root_url( year: start_date.year), class: 'year_selector'}" },
|
||||||
previous_link: -> (param, date_range) { link_to '<<', { param => date_range.first - 1.day } },
|
previous_link: ->(param, date_range) { link_to '<<', { param => date_range.first - 1.day } },
|
||||||
next_link: -> (param, date_range) { link_to '>>', { param => date_range.last + 1.day } } do |date, events|
|
next_link: ->(param, date_range) { link_to '>>', { param => date_range.last + 1.day } } do |date, events|
|
||||||
.day_number= date.day
|
.day_number= date.day
|
||||||
%ul.events
|
%ul.events
|
||||||
- events.select { |e| e.start_time.to_date <= date and date <= e.end_time.to_date }.sort_by { |e| e.city }.each do |event|
|
- events.select { |e| e.start_time.to_date <= date and date <= e.end_time.to_date }.sort_by { |e| e.city }.each do |event|
|
||||||
|
Loading…
Reference in New Issue
Block a user