Skip to content

Instantly share code, notes, and snippets.

@spencereldred
spencereldred / polymorphic_association.md
Last active August 29, 2015 13:56
polymormic assiciations

Polymorphic Association

When you have one model that could belong to any one of a set of models.

Comments is the classic example.

A comments could belong to a book, a video or a photo.


Goals:

  • Understand overview of polymorphic relationships.

  • How to set up model relationships.
@spencereldred
spencereldred / rspec_tests.md
Last active August 29, 2015 13:59
Rspec Test Lesson

RSpec Testing

  • TDD - Test Driven Development

Student Learning Objectives:

  • By the end of this lesson you should be able to:

    • 1) Set up an rspec testing environment for a ruby project

@spencereldred
spencereldred / rails_views_controllers_lesson.md
Last active August 29, 2015 14:00
Rails Views and Controllers Lesson

Rails Views and Controllers Lesson

  • Today we are going to review a completed rails app: Todo App.

  • Todo App is a complete implementation of a CRUD.

  • The morning we will review the Todo App in detail.

  • The afternoon lesson will be a code along to create the Todo App.

We will analyze the todo_app in detail

  • We will follow how the Views and the Controller communicate together.

    * We will follow a typical rails code development sequence.