Skip to content

Instantly share code, notes, and snippets.

View deborahleehamel's full-sized avatar

Deborah Hamel deborahleehamel

View GitHub Profile
Length Points Week
20 minutes 10 Week 2

The Concept of Require - Research

When you start working with WebPack for GameTime, you'll notice that you can't just define a variable in one file and find it in another as easily as you can in Rails.

Deliverable

@deborahleehamel
deborahleehamel / rails_setup.md
Created October 17, 2016 08:06 — forked from ryanflach/rails_setup.md
Common setup for a new Rails project
  1. rails new <project_name> -d postgresql --skip-turbolinks --skip-spring -T
  • -d postgresql sets up the project to use PostgreSQL
  • --skip-turbolinks & --skip-spring creates a project that does not use turbolinks or spring
  • -T skips the creation of the test directory and use of Test::Unit
  1. In the Gemfile:
  • Available to all environments:
    • gem 'figaro' - store environment variables securely across your app (docs)
    • Uncomment gem 'bcrypt', '~> 3.1.7' if you will be hosting your own user accounts with passwords (docs)
  • Inside of group :test:
    • gem 'rspec-rails' - user rspec in place of minitest (docs)

##Leap My code: here

  • Responder #1 (here) - This responder defined new variables for each condition check rather than the if/return I chose.

  • Responder #2 (here) - This person also used the if/return conditionals, but separated the last condition in a separate check.

  • Responder #3 (here) - This user did an explicit check for every condition.

##Hamming My code: here

Length Points Week
15 minutes 5 Week 1

ES6 Research

Throughout the module (and your journey to Google enlightenment while working on IdeaBox2.0) you may notice a few different ways that JavaScript code is being written.

That might have something to do with something called ES6 and ES5

## Models, Databases, Relationships in Rails
#### What is the difference between a primary key and a foreign key? Where would we find a primary key? What would it be called by default? Where would we find a foreign key? What is the naming convention for a foreign key?
Primary key is the original id generated when a table is created. <br />
Foreign key is the relationship to another object in another table and is formatted with ending _id.<br />
#### Write down one example of:
* a `one-to-one `relationship.
one person has one social security number<br />
@deborahleehamel
deborahleehamel / cfu_crud_in_sinatra.markdown
Last active March 23, 2016 04:23 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding

###Define CRUD.

C - Create R - Read U - Update D - Delete

###There are seven verb + path combinations that are necessary in a basic Sinatra app in order to provide full CRUD functionality. List each of the seven combinations, and explain what each is for.

GET/tasks

Introduction to Sinatra

1. What is the purpose of the server file (routing)?

Acts as a gateway. Takes request and parses any logic and displays, renders or redirects as code indicates.

2. How do you pass variables into the views?

Variables can be passed into views by setting instance variables or sending local variables that can be referenced in your erb view files respectively.

3. How can we interpolate ruby into a view (html)?