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.176 lib/trash/event.rb
ish_models-0.0.33.175 lib/event.rb
ish_models-0.0.33.174 lib/event.rb
ish_models-0.0.33.173 lib/event.rb
ish_models-0.0.33.172 lib/event.rb
ish_models-0.0.33.170 lib/event.rb
ish_models-0.0.33.169 lib/event.rb
ish_models-0.0.33.168 lib/event.rb
ish_models-0.0.33.167 lib/event.rb
ish_models-0.0.33.166 lib/event.rb
ish_models-0.0.33.164 lib/event.rb
ish_models-0.0.33.163 lib/event.rb
ish_models-0.0.33.162 lib/event.rb
ish_models-0.0.33.161 lib/event.rb
ish_models-0.0.33.160 lib/event.rb
ish_models-0.0.33.159 lib/event.rb
ish_models-0.0.33.158 lib/event.rb
ish_models-0.0.33.157 lib/event.rb
ish_models-0.0.33.156 lib/event.rb
ish_models-0.0.33.154 lib/event.rb