Sha256: 59f4767e075b4628aa52164af7b047fa9214010ee2d187a9cf001200211e4ace

Contents?: true

Size: 596 Bytes

Versions: 123

Compression:

Stored size: 596 Bytes

Contents

class Event
  
  include Mongoid::Document
  include Mongoid::Timestamps
  
  field :name, :type => String
  validates :name, :presence => true, :uniqueness => true

  field :eventname, :type => String
  validates :eventname, :presence => true, :uniqueness => true

  field :description, :type => String

  field :date, :type => DateTime
  validates :date, :presence => true
  
  belongs_to :city
  validates :city, :presence => true

  field :x, :type => Float
  field :y, :type => Float

  has_one :profile_photo, :class_name => 'Photo', :inverse_of => :profile_event
  has_many :photos

end

Version data entries

123 entries across 121 versions & 1 rubygems

Version Path
ish_models-0.0.33.87 lib/event.rb
ish_models-0.0.33.86 lib/event.rb
ish_models-0.0.33.85 lib/event.rb
ish_models-0.0.33.83 lib/event.rb
ish_models-0.0.33.79 lib/event.rb
ish_models-0.0.33.78 lib/event.rb
ish_models-0.0.33.77 lib/event.rb
ish_models-0.0.33.76 lib/event.rb
ish_models-0.0.33.75 lib/event.rb
ish_models-0.0.33.74 lib/event.rb
ish_models-0.0.33.73 lib/event.rb
ish_models-0.0.33.71 lib/event.rb
ish_models-0.0.33.70 lib/event.rb
ish_models-0.0.33.69 lib/event.rb
ish_models-0.0.33.68 lib/event.rb
ish_models-0.0.33.67 lib/event.rb
ish_models-0.0.33.66 lib/event.rb
ish_models-0.0.33.65 lib/event.rb
ish_models-0.0.33.64 lib/event.rb
ish_models-0.0.33.63 lib/event.rb