This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'date' | |
# Livecode | |
def days_until_christmas | |
# return the number of days until net christmas | |
today = Date.today | |
current_year = Date.today.year | |
christmas = Date.new(current_year, 12, 25) | |
# subtract to get the amount of days b/w | |
christmas = christmas.next_year if today > christmas |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enthusiasm = 10 | |
love_x = "love " * enthusiasm | |
comment = "I #{love_x}LeWagon" | |
# airbnb listings // defining an array | |
listings = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
NewerOlder