Pas de cache, pas assez utiles :)
This commit is contained in:
parent
8901183d12
commit
b5fd79e4e0
@ -1,7 +1,3 @@
|
|||||||
ActiveAdmin.register Region do
|
ActiveAdmin.register Region do
|
||||||
permit_params :name
|
permit_params :name
|
||||||
|
|
||||||
after_update do
|
|
||||||
expire_fragment 'regions'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
-# Seems necessary, for the time being, to ensure calendar is changing days correctly
|
-# Seems necessary, for the time being, to ensure calendar is changing days correctly
|
||||||
- Time.zone = 'Paris'
|
- Time.zone = 'Paris'
|
||||||
|
|
||||||
- cache 'regions' do
|
|
||||||
= render '/regions/selector'
|
= render '/regions/selector'
|
||||||
= render '/lugs/search'
|
= render '/lugs/search'
|
||||||
|
|
||||||
@ -22,7 +21,8 @@
|
|||||||
root_url(start_date: start_date), class: 'month_selector' } do |date, events|
|
root_url(start_date: start_date), class: 'month_selector' } 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|
|
||||||
%li.event
|
%li.event
|
||||||
= link_to event do
|
= link_to event do
|
||||||
%strong.city= event.city.gsub '-', ' '
|
%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|
|
{ param => (date_range.last + 1.day).beginning_of_month, tag: params[:tag], region: params[:region] } } 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|
|
||||||
%li.event
|
%li.event
|
||||||
= link_to event do
|
= link_to event do
|
||||||
%strong.city= event.city.gsub '-', ' '
|
%strong.city= event.city.gsub '-', ' '
|
||||||
|
Loading…
Reference in New Issue
Block a user