Rails is an open-source web framework that's optimized for programmer happiness and sustainable productivity. This course covers all the basics of Ruby on Rails and prepares you to start developing web applications on the platform.
Using an example web application, this course demonstrates how to use Rails' latest features. The application is a simplified Q&A site for the history of the universe. Users can post questions about the universe and other users will be able to reply. We will talk about controllers, views, models, migrations, emails, background jobs, the asset pipeline, and a few other things. We will also learn how to deploy a Rails application to the cloud.
Samer Buna is a polyglot coder with years of practical experience in designing, implementing, and testing software, including web and mobile applications development, API design, functional programming, optimization, system administration, databases, and scalability. Samer worked in several industries including real estate, government, education, and publications
Models and Migrations In this module we're going to be working with data and explore how to work with Rails models and migrations among a few other things. We'll create our resources and models and we'll use a migration to create tables in the database. We're going to explore the Rails console, a very powerful tool that will allow us to work with models directly. We'll see what we can do with ActiveRecord and the methods we need to read and update the data. We'll then change our mockups view and bring them to life with real data. We'll see how to use instance variables in the controller to allow us to read data in the views. We'll also work a little bit with gravatars, which is a very popular service that turns emails into avatars. While working on the views we're going to use built in view helpers and also create our own view helpers. We'll also see how to submit data from HTML forms and we're going to explore Rails logs and how to monitor them for useful information. When we save new questions and answers to our database we need to use Rails strong parameters in the controller. I'll show you how to do that. And we'll also get a chance to explore URL helpers and reference URLs by name rather than by endpoint. We're going to be defining relationships between our question and answer models. A question will have many answers and an answer is going to belong to a question. We'll also see how to sort the data that we're displaying in the view. DRY in Rails is a big concept. It's about not repeating any code you use. We'll see what that means when it comes to methods common between multiple classes.
Action Mailer and Active Job In this module we're going to improve the user interface of our questions and answers app a little bit, but we're going to sending emails. It's all about giving the user more information and making the interactions we require from them easier if we can. We're going to use the session concept in Rails to remember the user's email when they first use it. Then we'll prepare, test, and send emails to the author of a question when they receive a new answer. We will be doing this task with TDD. Testing is really important and Rails and encourages testing. We'll also explore how we can preview our HTML emails right in our browsers before sending them. We'll see how to simulate a slow process with the sleep method, then how to send emails with a background job using the sucker punch adapter.
Deployment In this module we will deploy our app to the cloud and make it accessible to everyone on the web. We will be using Heroku for that. We'll start by installing and configuring their toolbelt, which is a group of command line tools that we can use with Heroku. We'll see how to switch our production configuration to use PostgreSQL instead of SQLite. And we'll explore how to do this in the gemfile and how to use the bundle command also how to update our gems using the bundle command. I'll also show you how you can push the button to deploy to Heroku. And I'll show you a few handy things you can do on Heroku so that you can manage your app.