
James guides you to build a real Ruby on Rails app from scratch without scaffolding, using essential gems to create a minimum viable version.
Prepare your Rails projects by installing a text editor (Sublime Text) or any editor you prefer, and using a command line interface, then learn Git basics with the included resources.
Set up your local Rails development environment by following a cross-platform installation guide, install Ruby, configure Git, verify Ruby and Rails versions, and prepare a database for production.
Explore the rails application structure, creating a new app, installing gems with bundle install, and navigating core folders—config, db, views, controllers, and public assets—plus running the server and exploring routes.
Explore restful routing in Rails by defining resources for events, generating the controller and model, migrating the database, and implementing the new and create actions with a form.
Learn to create new objects in Rails by implementing the create action. Use strong parameters to secure submitted data and manage redirects and flash messages.
Learn to read data with show, then edit and update records using a single form and template. Manage changes with branches and git push workflows for Rails projects.
Configure root routing to events and implement dry by extracting a before_action set_event for show, update, and destroy. Rescue ActiveRecord::RecordNotFound to flash 'the page you requested does not exist'.
Review the MVC architecture and application structure, and outline the seven actions of the events controller within REST resources. Highlight how validations ensure data is correctly submitted to the database.
Learn to create dynamic page titles with a helper using a default title and a provided page title via yield, and format dates for readability in Rails.
Learn styling the show page and form in a Rails app by refining the index view, linking images, applying bootstrap classes, and wiring event details for a polished user interface.
Generate a user model with device, migrate the database, and explore sign in, sign up, and sign out flows, routes, and navigation links for authentication.
Learn to associate users and events in Rails by linking a user's primary key to events and establishing belongs to and has many relationships, using migrations and references.
generate devise views for sign in, sign out, and sign up in a rails app, styling with bootstrap and simple form for polished user authentication pages.
Extend the Devise user model by adding first name, last name, and organization fields, generate a migration, and refresh the sign-up view to capture these attributes.
Learn how to customize authentication parameters in a Rails app using strong parameters, permitting fields like first name, last name, username, and organization in Devise forms, signup, and account update.
Show user page part 2 demonstrates displaying a user name on the show page and listing events they organize. Explain how to mark events as past or upcoming.
Learn to set up authorization in a Rails app with the pundit gem, generate policies, and enforce permissions for creating, updating, and destroying events.
Enforce access control in Rails by calling the authorize method on every action via the application controller, handle not authorized messages, and use after_action with Devise exceptions.
Implement authorization and access control by granting permissions, installing and setting up the system, and hiding features from unauthorized users; the next session demonstrates implementing access rules.
Build an admin dashboard in Rails using a namespace, with an admin controller and routes, and enforce admin-only access via Devise and Pundit.
Create a well-structured admin dashboard in a Rails app, import the stylesheet to reflect styling, and navigate between categories, attendees, tags, and comments while testing admin login.
Define an admin-only category system in Rails by creating an admin namespace with a categories controller and model, routes, and views for new and index, including form handling and validations.
Learn to create and style the categories index page inside a namespace, configure the controller and routes, and link to each category's show page with admin-only access.
Explore editing and updating categories in a Rails app by using a before_action to find the category and render the edit template, plus flash messages for updates.
Learn how admins delete categories, create new ones, edit existing ones, and how flash messages confirm actions, while exploring category views and publishing under specific categories.
Mount the image uploader, generate the image uploader, create and run a migration to add an image string to the events table, and verify the changes.
Configure the image upload gem in Rails events by permitting the image field, adding a file input to the form, and testing the upload on an edited event.
Learn to manage frequently changing image uploads in a Rails app by adding public/uploads to .gitignore, ensuring these assets aren’t tracked and commits stay clean.
Implement friendly urls using friendly_id to swap numeric ids with user names and event titles, update category names, and verify changes in the app before committing on the subbranch.
Explore how to implement search functionality in a Rails app using the Sedgewick gem, including prerequisites of elastics and Java, with a quick setup and integration guide.
Implement the has-many and belongs-to relationships between categories and events, render categories in the event form, and adjust views and controllers to show and publish categorized events.
Learn to associate comments with events using nested resources, defining has many comments and belongs to an event, and manage routes, controllers, forms, and migrations.
Render a comment form on the event show page to let users post comments, linking events and comments via nested resources and updating the comments controller and view.
Associate comments with users in a Rails app by adding a user_id via migration and belongs_to, then enforce sign-in and authorization with pundit.
Add a seats column to events, migrate DB, expose seats in forms and views, implement seats left in model, decrement on registration, and show a notice when capacity is reached.
The Challenge
So you have been developing your Rails application for sometime now, after a tutorial or two. Your data model is all setup and well implemented. But now, you want to include those common features that almost every web application has. What do you do?
This is where, Essential Gems for Your Rails Project comes in.
In this course we'll build an event hosting and registration application using the Rails web framework from scratch, without using the famous scaffold generator in Rails, that will allow us to publish events and allow users to register and attend such events.
We are going to build a generic event hosting application based on some features available in already existing events hosting platforms such as Eventbrite and Egotickets.
With the absolute beginner in mind, we will explore the basics of web application development such as CRUD (create, read, update & destroy) of databases, model-view-controller / MVC architecture, associations, etc.
We will also cover ten (10) essential libraries / gems, which is the theme of this course, to assist you in every Rails application, to make your job easier and help you work faster to produce quality software. These libraries include pagination, authorization, authentication, file uploads, search, friendly urls, debugging, etc.
It is not going to be about gems only, we'll implement some key features & concepts in most web applications such as categorizations, tagging, admin dashboard, associations, model-view-controller, data modeling, etc.
By the end of this course, you will develop a full functional rails application from scratch, which you can use some of the gems and features in your own projects.
If you are excited and ready to learn, lets get started!