Sha256: a42bd9ea386bb9f71c2d98e612c32e9f6cbf49fa19bfcff30182572400861ef3

Contents?: true

Size: 754 Bytes

Versions: 24

Compression:

Stored size: 754 Bytes

Contents

class ::Gameui::Map
  include Mongoid::Document
  include Mongoid::Timestamps

  has_many :markers, :class_name => '::Gameui::Marker', inverse_of: :map

  field :slug
  validates :slug, uniqueness: true, presence: true
  field :parent_slug

  field :w, type: Integer
  validates :w, presence: true

  field :h, type: Integer
  validates :h, presence: true

  field :description

  field :img_path

  ORDERING_TYPE_ALPHABETIC = 'alphabetic'
  ORDERING_TYPE_CUSTOM     = 'custom'
  ORDERING_TYPE_TIMESTAMP  = 'timestamp'
  ORDERING_TYPES = [ ORDERING_TYPE_ALPHABETIC, ORDERING_TYPE_CUSTOM, ORDERING_TYPE_TIMESTAMP ]
  field :ordering_type, type: String, default: 'custom' # timestamp, alphabetic, custom
  validates :ordering_type, presence: true

  
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ish_models-0.0.33.129 lib/gameui/map.rb
ish_models-0.0.33.128 lib/gameui/map.rb
ish_models-0.0.33.127 lib/gameui/map.rb
ish_models-0.0.33.124 lib/gameui/map.rb
ish_models-0.0.33.123 lib/gameui/map.rb
ish_models-0.0.33.122 lib/gameui/map.rb
ish_models-0.0.33.121 lib/gameui/map.rb
ish_models-0.0.33.120 lib/gameui/map.rb
ish_models-0.0.33.119 lib/gameui/map.rb
ish_models-0.0.33.118 lib/gameui/map.rb
ish_models-0.0.33.117 lib/gameui/map.rb
ish_models-0.0.33.116 lib/gameui/map.rb
ish_models-0.0.33.115 lib/gameui/map.rb
ish_models-0.0.33.114 lib/gameui/map.rb
ish_models-0.0.33.113 lib/gameui/map.rb
ish_models-0.0.33.112 lib/gameui/map.rb
ish_models-0.0.33.111 lib/gameui/map.rb
ish_models-0.0.33.110 lib/gameui/map.rb
ish_models-0.0.33.109 lib/gameui/map.rb
ish_models-0.0.33.108 lib/gameui/map.rb