First checkin
This commit is contained in:
parent
f207e2c8b7
commit
90b30db9e8
260 changed files with 37349 additions and 0 deletions
17
app/models/track.rb
Normal file
17
app/models/track.rb
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class Track < ActiveRecord::Base
|
||||
attr_accessible :name, :description, :color
|
||||
|
||||
belongs_to :conference
|
||||
|
||||
before_create :generate_guid
|
||||
|
||||
private
|
||||
|
||||
def generate_guid
|
||||
begin
|
||||
guid = SecureRandom.urlsafe_base64
|
||||
end while Person.where(:guid => guid).exists?
|
||||
self.guid = guid
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue