Optimisation rapide pour génération fichier ical
This commit is contained in:
parent
8fed58c387
commit
741bee5fbc
@ -15,7 +15,7 @@ class EventsController < ApplicationController
|
||||
respond_to do |format|
|
||||
format.html { render layout: 'iframe' if params[:iframe] }
|
||||
format.rss { @events = @events.future }
|
||||
format.ics { @events = @events.last_year }
|
||||
format.ics { @events = @events.last_year.includes :related_region }
|
||||
format.xml { @events = @events.includes :related_region }
|
||||
end
|
||||
end
|
||||
|
@ -10,9 +10,9 @@ BEGIN:VEVENT
|
||||
DTSTART:<%= event.start_time.strftime '%Y%m%dT%H%M%S' %>
|
||||
DTEND:<%= event.end_time.strftime '%Y%m%dT%H%M%S' %>
|
||||
UID:<%= event.id %>@agendadulibre.org
|
||||
SUMMARY:<%= event.title.gsub(/,/, '\,').gsub(/;/, '\;') %>
|
||||
SUMMARY:<%= event.title.gsub(',', '\,').gsub(';', '\;') %>
|
||||
URL:<%= event_url event %>
|
||||
DESCRIPTION:<%= strip_tags(event.description).gsub(/'/, '’').gsub(/,/, '\,').gsub(/;/, '\;').gsub /^/, ' ' %>
|
||||
DESCRIPTION:<%= strip_tags(event.description).gsub(/'/, '’').gsub(',', '\,').gsub(';', '\;').gsub(/^/, ' ') %>
|
||||
LOCATION:<%= event.full_address.gsub(/,/, '\,') %>
|
||||
END:VEVENT
|
||||
<% end %>
|
||||
|
Loading…
Reference in New Issue
Block a user