Sha256: 79ea5c7564c6f349e48d1ad343272b54214924cc250e66d5555f501dd5adae59
Contents?: true
Size: 474 Bytes
Versions: 22
Compression:
Stored size: 474 Bytes
Contents
class Game include Mongoid::Document field :high_score, :type => Integer, :default => 500 field :score, :type => Integer, :default => 0 field :name referenced_in :person, :index => true references_one :video, :validate => false accepts_nested_attributes_for :person cache validates_format_of :name, :without => /\$\$\$/ attr_protected :_id set_callback(:initialize, :after) do |document| write_attribute("name", "Testing") unless name end end
Version data entries
22 entries across 22 versions & 4 rubygems
Version | Path |
---|---|
mongoid_spacial-0.1.0 | spec/models/game.rb |
mongoid_spacial-0.0.1 | spec/models/game.rb |