Skip to content

Instantly share code, notes, and snippets.

@georgekettle
georgekettle / ruby_basics.rb
Created January 11, 2021 23:36
ruby basics
enthusiasm = 10
love_x = "love " * enthusiasm
comment = "I #{love_x}LeWagon"
# airbnb listings // defining an array
listings = []
@georgekettle
georgekettle / 20201223190654_create_questions.rb
Last active December 24, 2020 02:08
Livecode: Active Record Basics (Batch 466)
# migrate/20201223190654_create_questions.rb
class CreateQuestions < ActiveRecord::Migration[6.0]
def change
create_table :questions do |t|
t.string :question
t.string :option_a
t.string :option_b
t.timestamps # add 2 columns, `created_at` and `updated_at`
end
end