Skip to content

Instantly share code, notes, and snippets.

View daveroberts's full-sized avatar

Dave Roberts daveroberts

View GitHub Profile
class Klass < ActiveRecord::Base
has_one :teacher
has_many :students
end
class Teacher < ActiveRecord::Base
belongs_to :klass
has_many :students, through: :klass
end
@daveroberts
daveroberts / myblog.rb
Created February 14, 2012 04:46
Test ruby code
def blog
ideas = { :articles, :presentations, :code_snippets }
loop { real_life }
end