Rapide correction, pour que les lambdas passent sous ruby 1.9

This commit is contained in:
echarp 2014-06-27 01:06:07 +02:00
parent 3873317c24
commit 19cad28955

View File

@ -19,9 +19,9 @@
- params[:start_date] = "#{params[:year]}-#{i}-01"
= 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' },
previous_link: -> (param, date_range) { },
next_link: -> (param, date_range) { } do |date, 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' },
previous_link: ->(param, date_range) { },
next_link: ->(param, date_range) { } do |date, events|
.day_number= date.day
%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|
@ -32,9 +32,9 @@
- else
= 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'}" },
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|
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 } },
next_link: ->(param, date_range) { link_to '>>', { param => date_range.last + 1.day } } do |date, events|
.day_number= date.day
%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|