Simplification génération du flux rss, pour accélérer sa création
This commit is contained in:
parent
b6238ad910
commit
8d8c732504
@ -32,9 +32,7 @@ xml.rdf :RDF,
|
||||
|
||||
@events.each do |event|
|
||||
xml.item 'rdf:about' => event_url(event) do
|
||||
title = event.city
|
||||
title += ": #{event.title}"
|
||||
xml.title title + ", #{l event.start_time.to_date, format: :long}"
|
||||
xml.title "#{event.city}: #{event.title}, #{display_date event}"
|
||||
xml.link event_url event
|
||||
domain = root_url.gsub(/www/, '').gsub(/http.?:../, '').gsub(/:.*/, '')
|
||||
xml.dc :identifier, "#{event.id}@#{domain}"
|
||||
@ -43,11 +41,8 @@ xml.rdf :RDF,
|
||||
xml.georss :point, event.latitude, ' ', event.longitude
|
||||
end
|
||||
|
||||
@event = event
|
||||
content = render file: '/events/show.html', locals: { rss: true }
|
||||
|
||||
xml.description strip_tags content
|
||||
xml.content(:encoded) { xml.cdata! content }
|
||||
xml.description strip_tags event.description
|
||||
xml.content(:encoded) { xml.cdata! event.description }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user