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.111 lib/event.rb
ish_models-0.0.33.110 lib/event.rb
ish_models-0.0.33.109 lib/event.rb
ish_models-0.0.33.108 lib/event.rb
ish_models-0.0.33.107 lib/event.rb
ish_models-0.0.33.106 lib/event.rb
ish_models-0.0.33.105 lib/event.rb
ish_models-0.0.33.104 lib/event.rb
ish_models-0.0.33.103 lib/event.rb
ish_models-0.0.33.100 lib/event.rb
ish_models-0.0.33.99 lib/event.rb
ish_models-0.0.33.98 lib/event.rb
ish_models-0.0.33.97 lib/event.rb
ish_models-0.0.33.96 lib/event.rb
ish_models-0.0.33.95 lib/event.rb
ish_models-0.0.33.94 lib/event.rb
ish_models-0.0.33.92 lib/event.rb
ish_models-0.0.33.91 lib/event.rb
ish_models-0.0.33.90 lib/event.rb
ish_models-0.0.33.89 lib/event.rb