
Demonstrate the features the application to be developed has and the work to be accomplished.
The Ruby Version Manager will allow us to install several versions of Ruby on the same computer without interfering with each other. Students will be able to create repositories into which various versions of Ruby can be installed.
We install a specific version of Ruby using the Ruby Version Manager (RVM) without interfering with any versions of Ruby already installed on the computer.
Students will be able to create a gemset, which is a repository into which we will install our chosen version of Ruby on Rails. By using a gemset, we will be able to isolate the version of Rails we create from other versions of Rails on the computer.
We need Node.js to develop our application but we don't have to know Node.js. We also install Yarn as our package manager. Once Node.js and Yarn are installed we will be able to install Rails using a gem called Webpacker.
With all the dependent tools installed, we have to install Ruby on Rails 6 into the gemset created and use it and use it to develop our application.
Students will learn how to install Ruby on Rails 6 into the Gemset created earlier on. This will prevent collision with other versions of Rails on the computer.
The static files are rendered by the Rails server so they are copied into the public folder of the Rails project. Students will appreciate what happens when static files with certain names change the behaviour of Rails.
We describe the files and folders structure of a typical Ruby on Rails project. Students will know where the files of the project could be found and where to put certain files and folders.
Rails uses the model-view-controller (mvc) pattern to separate the various functions of the application being developed. We briefly discuss this pattern and how it is used in Ruby on Rails.
We take a look at the folders and files that are found in the views folder and discuss what the files found in the folder and subfolders of views folder are used for.
The Rails routing is discussed in terms of the role the Router plays in handling http requests.
At the end of the lecture, students will get an understanding of where the controller fits into the MVC pattern and how to use it.
We start to move the html content of the static files to the Rails layout file and rename the index.html file.
Students learn how to create controllers and controller actions in Rails. Also, students learn about the folders and files that are created as a result of creating a controller and actions
Students learn how the contents of Rails view templates are rendered on the screen.
Bootstrap 4 npm module is installed using yarn. Students will be able to install Bootstrap 4 and set it up for use in Rails 6.
Lecture details what embedded Ruby is and how it is used in Rails view templates.
Rails view partials are discussed and their use demonstrated. The layout file is broken up into partials that are referenced in it.
The application's footer is sectioned off into it's own partial file and referenced in the layout file.
Move the remaining html markup from the layout file and into the index view template.
Students learn how to use variables in the view templates by factoring out the varying product data into variables.
Replace the hardcoded data with Ruby variables using ERB tags
This lecture fixes the product price format error.
The lecture teaches students how to using loops to eliminate duplication of view markup
To make our partials dynamic we learn how to pass dynamic data into our partials
Students learn how to remove complex code from the view templates into Action View helper methods
The challenge gives students the opportunity to do a hands-on exercise and to practise how to use ERB tags.
Students learn how to move data from the view template to the controller and how to reference the data in the view.
Lecture teaches how to create models using the right data types for the fields for data storage and retrieval
Students learn about active record migration and how to use it in Rails applications
The lecture describes the method of populating the database tables with data called seeding. The file for doing that is created and the code for populating the tables is written in the file
The code written in the previous video is executed to populate the database tables with data.
The controller action that is used to retrieve a product using a given id and made available to the view is defined
The hard-coded data in the show view template is replaced with data from the database. This is a hands-on challenge for students.
The lectures teaches how to write a route that uses a placeholder for an id
The lecture details how the product id is passed in the view to the controller and how it is accessed in the controller
Students learn how to create the route for listing many products in the database
The lecture demonstrates how to create the route that will make it possible to render the form for creating a new product.
The lecture teaches how to replace the form html tags with Rails form helper methods.
The lecture shows how to post form input data from the view to the Products controller's create action. In the process we create the post route for creating a product. We also learn how to handle the form data passed to the controller.
The lecture shows how an existing product can be retrieved from the database and displayed on the screen from editing.
The lecture shows how to avoid code duplication by factoring out the common code in the new and edit forms into a partial
The lecture shows how to create the route for updating the posted data as well as the controller action that handles the actual updating.
The lecture demonstrates how the view code has to be written to be able to delete a given product and the controller action code that does the actual deleting of the product.
The lecture shows how to get rid of duplicate code in the controller actions by using filters in the controller
The lecture shows how to handle record not found errors in the controller.
To ensure that the data being sent the database is what we expect it to be, we have to validate the attributes before being saved. The process of validation is what this lecture is about.
Students learn what happens to an active record model when it fails to save and when it saves successfully and the importance of knowing this.
Students learn to take different courses of action depending on the outcome of a save/update of a resource.
Students learn to give differing feedback to users in the form of flash messages depending on whether a say is successful or not.
Flash.now is introduced to ensure that the flash message disappears when page is refreshed after an error occurs.
Students learn how to simplify routes by using resourceful routing to replace the seven routes with a single one.
The lecturer describes user management and why it is important in our application.
The lecture details the mechanics of signing a user up and the tools needed to register a user. What goes into the creation of the use model is discussed.
The lecture shows how to install and set up the Bcrypt gem for hashing our passwords before saving the user records to the database.
This lecture covers how to validate the user model to ensure that bad data is not saved to the database.
The lecture covers the basics of regular expressions in preparation for using regex to validate user email addresses.
This lecture details how to write the regular expression to match user email addresses and modify the user model validation code to use the REGEX.
This lecture introduces the concept of callbacks in the user model, which is used to automatically change the case of the email address to all lowercase before saving.
The downcasing and uniqueness of email addresses are verified on the Rails console in a sandbox environment.
This is a hands-on challenge for the students. Students create the controller with two actions, new and create, as well as the routes required for creating users.
This is also a hands-on challenge for students to create the registration form from the static files.
This lecture details the implementation of the create action of the UsersController
React.js is the web development library of choice by many web developer and there is still a huge demand for React developers. Also, Ruby on Rails is now a mature web development framework still favoured by start-ups. With the Rails 6, it is very easy to develop front-end applications in JavaScript. Combining these two technologies gives developers powerful tools to develop full-stack web applications.
I’m Emmanuel Asante, a freelance developer and the creator of comprehensive Rails testing courses using Rails, RSpec and Capybara, and this course is no different.
This course will show you, step-by-step, how to take static html pages and turn them into a dynamic application using the awesome Ruby on Rail 6 framework. You will learn to build a fully functional application with authentication and authorization and deployed to Heroku.
With the Rails application deployed, we switch gears and learn step-by-step how to turn the Rails application into a single-page application using React.js. This second part will give you an awesome experience with the great React library. You will go from an absolute beginner to a pro by the time you are done with the course. You will learn how to create components, manage state, use advanced features of react-router-dom to switch views. Authentication and authorization will be covered. Also, you will learn about and use React hooks and advanced concepts such as higher-order components to simplify our code.
What is so cool about this course is the fact that you can just start with the React development part if you so desire and you won’t be lost in it. The course is loaded with many hands-on coding challenges. By the time you are done with the course, you will be a Rails and React pro. Guaranteed! Come along with me on this amazing journey and you will be glad you did.