Ruby on Rails (Part 2 of 5): Best Practices
Interactive

Ruby on Rails (Part 2 of 5): Best Practices

Biz Library
Updated Feb 04, 2020

To begin this course we will cover how the model view controller design pattern works in the Ruby on Rails framework, specifically discussing the rolls and best practices associated with each element. We will walk through the file system so you can become familiar with items such as the respective roles of our config directory, how the asset management system is structured, plus many other items, and lastly, how we utilize the Gemfile. The Ruby on Rails development stack works very closely with version control management systems such as Github and we will cover what Git is, why it is important and how to implement it into our application. Routing is one of the core fundamentals of any web application, and we will walk through how to setup a root homepage. We will finish up this course by building a scaffold into our application that interacts with our database, has form elements for the user, renders a database query on the page and is tested using RSpec.


Lesson 1:

  • Overview
  • Model
  • View
  • Controller
  • Demo: MVC.

Lesson 2:

  • Config
  • Assets
  • Logic
  • Layouts
  • Database
  • Gemfile
  • Demo: Config Directory
  • Demo: Asset Directory
  • Demo: Layouts Directory
  • Demo: Database Directory
  • Demo: Gem File.

Lesson 3:

  • Why use git?
  • Basic commands
  • Branching & Commands
  • Reverting
  • Demo: README file
  • Demo: Revert Back.

Lesson 4:

  • Setting the homepage
  • Resources
  • Pages
  • Usage in Rails
  • Demo: Routing
  • Demo: Homepage Control
  • Demo: Link to
  • Demo: Navigation Bar
  • Demo: Git Status.

Lesson 5:

  • Setting up Rspec
  • Scaffolds
  • Demo: Setting up Rspec
  • Demo: Create Scaffold
  • Demo: Start servers
  • Demo: Adding a Tab
  • Demo: Rspec Testing
  • Demo: Testing Failure.