Skip to content

Instantly share code, notes, and snippets.

@ilyakrasnov
ilyakrasnov / game.rb
Created November 19, 2017 07:13 — forked from kenmazaika/game.rb
Populate the Board of a Chess Game
class Game < ActiveRecord::Base
# all the associations, etc.
after_create :populate_board!
def populate_board!
# this should create all 32 pieces with their initial X/Y coordinates.
end
end