osem-fcy/app/models/track.rb
Henne Vogelsang 28063129c7 Implement consistent admin interface
* Consistent route/model/controller/view layout
* Get rid of unused photos, speakers, dietchoices, social_events controllers
* Drop unused :public from Rooms and :description from CallForPapers
2014-11-25 10:47:18 +01:00

17 lines
380 B
Ruby

class Track < ActiveRecord::Base
attr_accessible :name, :description, :color, :conference_id
belongs_to :conference
has_many :events
before_create :generate_guid
private
def generate_guid
guid = SecureRandom.urlsafe_base64
# begin
# guid = SecureRandom.urlsafe_base64
# end while Person.where(:guid => guid).exists?
self.guid = guid
end
end