Initial XML export support (FRAB compatible)

This commit is contained in:
Daniel Molkentin 2016-06-11 00:53:51 +02:00
parent 1cc2b0cac2
commit 628e433fbc
6 changed files with 51 additions and 0 deletions

View file

@ -223,6 +223,12 @@ class Event < ActiveRecord::Base
(100 * result.values.count(true) / result.values.compact.count).to_s
end
##
# Returns the slug of an event
def slugify
"#{self.id}-#{self.title.downcase.gsub(/[^a-z1-9]+/, '-').chomp('-')}"
end
private
##