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