Skip to content

Instantly share code, notes, and snippets.

View Digital-Learner's full-sized avatar

Digital Learner Digital-Learner

View GitHub Profile
#!/usr/bin/env ruby
class Manager
def pick_a_team(squad)
team = Team.new
# get the best players for every position from the squad
# and add them to the team
# for every position (goalkeeper etc)
# get the best player(s) from the squad
set autoeval
set autolist
set autoreload
@Digital-Learner
Digital-Learner / boat.rb
Created March 20, 2013 12:43
Attempt to generate a slug for use in first pairing individual project at Makers Academy
class Boat < ActiveRecord::Base
attr_accessible :name
before_save :generate_slug
# validates_presence_of :name
# validates_presence_of :slug
private