Real-life Ruby on Rails App From Scratch In 14 Hours (RSpec)

Start writing code and automated tests parallel like commercial Ruby on Rails developer.
Rating: 3.9 out of 5 (27 ratings)
9,410 students
English
Writing real-life application with automated tests
Writing code & specs in Test-driven development (TDD) flow
Writing model and controller specs in RSpec
Writing service objects (design pattern)
Debugging and fixing bugs in real time
Looking for solutions on your own

Requirements

  • Basic knowledge of Ruby
  • Basic knowledge of Ruby on Rails framework

Description

After two years of working as a Ruby on Rails developer, I decided to remake my first Ruby on Rails application.

This time I didn't forget about providing decent test coverage, so you can see how I'm writing specs. You can find a lot of tutorials on how to build different applications quickly, but many are written with any automated tests. Believe me, you don't write specs for your boss, you write specs for yourself to sleep well while you know that the features you provide are working as expected. If you don't like specs I'm pretty sure you will change your mind after this course. To be honest I love Ruby on Rails same as RSpec!

I didn't skip any part when I was looking for solutions using Google or trying to fix bugs I encounter, so you should get a better understanding of how writing Ruby on Rails application looks like in real life.

It's not always so easy, sometimes looking for the answer takes some time.

Are you ready for the challenge? Ready to become the next RoR & RSpec master? I hope so.

Please check the Course content section to see how many steps this tutorial has to develop the application you can see in Course Preview. These steps are not maybe so well planned as you may see in other tutorials but that's simply how programming looks like, you can't plan everything and often you need to improvise and be flexible.

Who this course is for:

  • Beginner Ruby on Rails developers curious how to write real-life Ruby on Rails application with decent test coverage

Course content

1 section80 lectures14h 35m total length
  • Introduction
    Preview04:11
  • Create a skeleton of the application
    05:58
  • Create a remote repository on GitHub
    03:54
  • Install RSpec
    05:10
  • Install Haml
    04:22
  • Create Word model
    17:22
  • Change the database from SQLite to PostgreSQL
    05:03
  • Install Simple Form gem
    02:41
  • Create WordsController and basic index view
    12:47
  • Write a spec for WordsController
    08:31
  • Add validation to check the presence of value and language attributes
    08:35
  • Install factory_bot gem
    08:40
  • Refactor spec for WordsController
    05:42
  • Create a view and form to add new words
    10:47
  • Write specs for new and create methods in WordsController
    24:06
  • Install bootstrap
    05:54
  • Set root_path and create show action for single Word with specs
    09:26
  • Rename the project
    09:07
  • Implement basic styling
    13:01
  • Update title and add a link to show view
    05:29
  • Rename column "value" to "content"
    05:44
  • Fix views after renaming the column
    01:36
  • Fix form after renaming the column
    02:34
  • Install language_list gem and add new validation for language field
    19:19
  • Move language string to separate model
    13:19
  • Add relationships between Word and Language models
    19:10
  • Allow editing Word
    22:21
  • Allow deleting Word
    09:02
  • Use before_action in WordsController
    04:40
  • Install Devise gem
    09:05
  • Add links to login, logout, etc
    05:48
  • Only signed-in users can add new words
    05:31
  • Improve spec to test scenarios when a user is signed in or not
    31:27
  • Connect word with user who created it
    12:52
  • Only signed-in users can edit and destroy words
    13:16
  • Prepare seeds
    11:35
  • Implement authorization with pundit gem
    13:01
  • Fix specs after authorization changes
    08:11
  • Write specs for authorization
    11:41
  • Add pagination for words index view
    13:18
  • Install brakeman, bundler-audit gems for security reasons
    09:43
  • Add new relationships to Word model for translations
    17:11
  • Add specs for new relationships between models
    09:59
  • Install nested_form gem and use it for translations
    15:35
  • Write a spec for nested_form stuff in create action
    22:35
  • Display count of translations for each word in the index view
    10:42
  • Do not allow translations to be in the same language as Word
    15:50
  • Implement bootstrap navbar and improve some styling
    17:44
  • Styling improvements to get a decent look
    36:42
  • Hide part of an email address for visitors
    12:06
  • Update rack gem to fix the security vulnerability
    03:38
  • Create Game model
    08:45
  • Fix bug about deleting translations
    04:34
  • Allow user to create new Game
    12:36
  • Write specs for creating new Game by user
    20:25
  • Authorize Game object so only its user can access it
    06:57
  • Add info about good and bad answers to show page
    04:03
  • Create a service object to get random Word
    21:52
  • Query only words with translations when looking for random Word
    09:57
  • Create a service object to check the answer provided by a user
    10:15
  • Write specs for service object checking answers
    07:16
  • Try to use service object to check answers in view
    32:29
  • Update game stats and write new specs for the service object
    18:28
  • Move logic about preparing message to service object
    15:17
  • Write specs for AnswersController
    17:45
  • Make sure that user can access the game
    06:48
  • Improve styling of Game show page
    13:28
  • Make main input autofocus
    02:23
  • Improve the way to notify if the answer was good or bad
    17:26
  • Add a link to continue previous Game
    06:23
  • Add correctness method to Game model
    22:08
  • Fix bug when trying to add new translation in edit view
    08:12
  • Add dependent destroy option
    04:02
  • Show links only if a user can perform the action
    03:01
  • Add confirm prompt before destroying Word
    02:33
  • Show input for first translation at once
    03:19
  • The end
    01:56
  • Improve index query
    03:01
  • Enable Faker gem on production & fix security issues by updating gems
    08:25
  • Fix other security issues by update gems (no sound)
    06:12

Instructor

Ruby on Rails Developer
Hubert Jakubiak
  • 3.9 Instructor Rating
  • 27 Reviews
  • 9,410 Students
  • 1 Course

I'm a Ruby on Rails Developer coming from an online advertising background.

I started my professional web developer career in January 2017 at age 27. I've worked on several commercial projects since then.

In my projects I always pay attention to details, so the quality of my solutions is very important to me. That's one of the reasons why I never forget about automated tests.

Have some questions? Find me on Twitter.

Happy Coding!