diff --git a/app/admin/region.rb b/app/admin/region.rb index 6103eaaf..ba6f3a0c 100644 --- a/app/admin/region.rb +++ b/app/admin/region.rb @@ -1,7 +1,3 @@ ActiveAdmin.register Region do permit_params :name - - after_update do - expire_fragment 'regions' - end end diff --git a/app/views/events/index.html.haml b/app/views/events/index.html.haml index 50335a0b..c5d2588b 100644 --- a/app/views/events/index.html.haml +++ b/app/views/events/index.html.haml @@ -1,9 +1,8 @@ -# Seems necessary, for the time being, to ensure calendar is changing days correctly - Time.zone = 'Paris' -- cache 'regions' do - = render '/regions/selector' - = render '/lugs/search' += render '/regions/selector' += render '/lugs/search' - if params[:year] -# Whole year calendar @@ -22,7 +21,8 @@ root_url(start_date: start_date), class: 'month_selector' } 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| + - events.select { |e| e.start_time.to_date <= date and date <= e.end_time.to_date } + - .sort_by { |e| e.city }.each do |event| %li.event = link_to event do %strong.city= event.city.gsub '-', ' ' @@ -40,7 +40,8 @@ { param => (date_range.last + 1.day).beginning_of_month, tag: params[:tag], region: params[:region] } } 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| + - events.select { |e| e.start_time.to_date <= date and date <= e.end_time.to_date } + - .sort_by { |e| e.city }.each do |event| %li.event = link_to event do %strong.city= event.city.gsub '-', ' '