Skip to content

Instantly share code, notes, and snippets.

# Write program that prints out the nth number in a fibonnaci sequence
# fib(n): 0, 1, 1, 2, 3, 5, 8, 13, 21, 34
# (n): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
require 'pry'
require 'minitest/autorun'
require 'minitest/pride'
def fib(n)

Incorporating Bootstrap with Rails

Goals

  1. Become comfortable with adding Bootstrap to a Rails application

Assignment

This homework assignment requires that you build upon your existing blog app (from the prior homework assignment)

  1. Add Bootstrap to your blog app

Rails Authentication

Goals

  1. Implement authentication into a rails application

Assignment

This homework assignment requires that you build upon your existing blog app (from the prior homework assignment)

Rails Forms

Goals

  1. Pull together everything you've learned about Rails thus far
  2. Explore the form generation possibilities using Rails!

Assignment

This homework assignment requires that you build upon your existing blog app (from the prior homework assignment)

Rails Models & Controllers

Goals

  1. Understand RESTful routing and how to create the routing necessary for an arbitrary resource in Rails

Assignment

This homework assignment requires that you build upon your existing blog app (from the prior homework assignment)

Basic Rails App

Goals

  • Get familiar with creating a Rails app and the basics, be sure your Ruby is up to par.

Assignment

  • Rails: Create a new Rails application for a blog with a Post model and Posts controller. The app should two views: One that lists all posts and one show the detail of a specific post.
  • When a user navigates to the root path of your app, they should be directed to a view that lists all posts.

Basic ActiveRecord Sinatra

Goals

  1. Understand how to create and access a database with ActiveRecord

  2. See how this database will be used and accessed from your Sinatra application

Assignment

class Scrabble
def score(word)
letters = word.upcase.split('')
total = 0
letters.each do |letter|
total += letter_scores[letter]
end
class Scrabble
def score(word)
letters = word.upcase.split('')
total = 0
letters.each do |letter|
total += letter_scores[letter]
end

Homework

Goals

  1. Start to grasp the fundamentals of Ruby web applications using Sinatra

Assignment

  1. Take a personal website project and convert it to a Ruby / Sinatra site. The site should have at least 3 sections and one of the pages should have a "Contact Me" form that allows users to submit a post request to your app.