Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Learn Ruby on Rails 7
Rating: 3.8 out of 5(109 ratings)
4,557 students
Created byTimnan Sheni
Last updated 11/2022
English

What you'll learn

  • Learn How to Create Applications using Ruby on Rails
  • Leverage the Power of Turbo Streams to Make Dynamic Web Applications
  • Learn How To Create CRUD actions in Ruby on Rails on the Fly
  • Learn How to Create Various Associations in Ruby on Rails
  • Learn How to Implement and Create Beautiful Rails Applications with Tailwind CSS
  • Implement a full Models-Views-Controller structure for your site

Course content

6 sections85 lectures4h 35m total length
  • Introduction1:20

    Learn how to create a new Rails project with rails new, name your blog, install dependencies from Ruby Gems, and explore the generated app structure.

  • Rails Application Structure1:16

    Explore the Rails project structure, from apps with assets, channels, controllers, models, and views, to gem file, Rails version, database, and config initializers.

  • Model View Controller1:26

    Learn Rails' model view controller architecture by exploring how models interact with the database, controllers map requests to actions, and views render HTML, JSON, or JavaScript.

  • Generating Model1:27

    Generate a model named article with title and content attributes, create the corresponding migration, and run migrations to create the articles table in the database.

  • Creating the Index Action4:14

    Learn ruby on rails 7 shows how to create the articles index action by generating a controller, def index, and mapping a get articles route to render the index view.

  • Creating the Root Page1:30

    Set up the root page by defining routes to map the default path to the articles index.

  • Index Action1:01

    Set the index action to load all articles into a variable and explore the rails console to create articles and query the database, noting nil when none exist.

  • Introduction to Rails Console3:21

    Practice creating and listing articles in the Rails console, setting article titles and content, and rendering them on the index page using ERB tags with the equal sign.

  • Show Action4:21

    Explore how the show action retrieves and displays articles by ID, uses the articles show method, renders the template, and handles missing article IDs in Ruby on Rails 7.

  • URL Helpers4:34

    Learn to create and link Rails pages with url helpers, using article paths and link_to, and navigate from index to show pages through routes.

  • New Action4:38

    Create blog entries in ruby on rails by defining an action in the articles controller, routing articles/new, and building a form with title and content fields to submit an article.

  • Create Action5:03

    Ruby on Rails 7 demonstrates a create action for articles, using strong parameters to permit title and content, redirecting on success and linking to new article from the index.

  • Edit Action2:22

    Implement the update flow by adding an edit action in the articles controller, loading the article by id, and creating the corresponding edit template linked from the show page.

  • Edit Action Template5:32

    Extract the edit form into a shared _form.html.erb partial and render it from edit and new views, then implement the update action with strong parameters and proper redirects.

  • Update Action2:19

    Learn to implement the update action in ruby on rails 7, including patch routes, id-based updates, and redirects to the articles path on success or renders edit on failure.

  • Delete Action3:23

    Learn how to implement a delete action in Ruby on Rails 7 by configuring a route and destroy action, then redirect to the articles index using a delete request button.

  • Set Articles ID2:45

    Refactor Rails 7 controllers to follow dry principles by introducing a set_article before_action that loads the article by id for show, edit, update, and destroy actions, reducing repetition across actions.

  • Resources and Routes2:06
  • Article Partial2:07

    Create an article partial for reuse in Rails views and render it in the index and show pages, using a local article variable.

  • Edit Link Path0:40
  • Active Record Validations5:31

    This lecture demonstrates adding validations to the article model to require a non-blank title and content, preventing blank articles from saving and showing error messages when save fails.

  • Creating Comments10:05

    Create a comments model linked to articles, define has_many and belongs_to associations, generate migrations, and wire controllers, routes, and strong params to display and save article comments.

  • Adding Styling Through Simple CSS1:33

    Apply global styling to a Ruby on Rails 7 blog by injecting simple CSS into the application's layout yield area, ensuring all pages share consistent design.

  • Comments Partial2:26

    Refactor the code by extracting the comments into a partial, render the comments partial on the show page, and create a form partial for comments to keep views clean.

  • Recreating Blog Application with a Scaffold Generator4:50

    We recreate a blog application using the scaffold generator to generate controllers, models, views, and routes for articles, then run migrations and explore index, new, edit, and destroy actions.

Requirements

  • You will need to know Ruby

Description

Ruby on Rails 7 is the latest and greatest version of Rails yet! In this course, we will learn the basics of Ruby on Rails and gradually move towards more complex topics. We will build 5 applications through this course, and by the end of the course, you will understand the fundamentals of Rails and how to use the latest features (i.e. Hotwire) in Rails.

First, we will create a Blog web application. Users would be able to create an article, and they would also be able to make comments.

Next, we will create an appointment booking application. Here, users would be able to create rooms and create booking appointments for each room. We will also learn how to authenticate users using Devise.

For the following application, we would create a note-taking application. We would use default Ruby on Rails features to create a powerful note-taking application.

We will then refactor our notebook application. Using Turbo Streams and Turbo Frames, we will make a more dynamic and powerful note-taking application without the inclusion of any additional javascript.

Finally, we would create a real-time chat application. Here, users would be able to visit different chatrooms and have other conversations in each chatroom.

Who this course is for:

  • This course is targeted at absolute beginners and those who are interested in learning Ruby on Rails
  • No prior Ruby on Rails Knowledge is required