
James guides you to build a real Ruby on Rails app from scratch without scaffolding, using essential gems to create a minimum viable version.
Build a full-featured Rails demo application with user login, event discovery, category search, attendee registration, comments, and admin management, guided by MVC architecture and authentication gems.
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.
Set up a cloud-based development environment for Rails by creating a Cloud 9 workspace with a Ruby template, using the command line and text editor in a single IDE.
Promote learning Ruby fundamentals before Rails with a quick Try Ruby tutorial, covering strings, numbers, arrays, and hashes, and guidance to visit tryruby.org.
Explore RubyGems, the open source package manager for Ruby, and learn how gems—packs of Ruby apps or libraries—save time, enable easy installation, and power Rails projects with essential gems.
Conclude the course intro by guiding you to set up the development environment—cloud and local—and introduce Ruby basics and gems as the core Rails focus for building the application.
Explore how the model-view-controller architecture organizes a Rails application by routing requests through the controller, fetching data via the model, and rendering views with embedded Ruby.
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.
Explore building read actions in a Rails app by implementing index and show for events: fetch all events, display a single event by id, and render views via RESTful routing.
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.
Learn how to implement create, read, update, and delete actions for events in a Rails app, including routes, path helpers, and destroy confirmations.
Learn to use the Rails console to inspect models, generate scaffolds, and manage events in your database, with commands to list and view records.
Learn how to implement validations in a Rails event model to prevent blank titles, enforce minimum length, and handle errors before saving to the database.
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.
Explore how Rails partials reduce code repetition by creating a reusable form partial and rendering it across views, with steps to define, call, and customize the partial display.
Design a Rails app interface by selecting ruby gems from the ruby toolbox, installing bootstrap-sass, and integrating assets for a polished user interface.
Install and configure the simple form gem to streamline Rails forms with bootstrap styling. Learn to generate and integrate simple form with bootstrap, using form helpers and date input options.
Style the events index page by applying the app's CSS style sheets, importing classes from existing UI, and adjusting layout, images, and buttons to create a polished, responsive interface.
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.
Implement a navigation bar in a Rails app, adjust its styling with a fixed top position, and highlight the current page while rendering flash messages for feedback.
Explore time format setup, a dynamic title in a helper directory, and UI gems like Bootstrap and Sass, with fonts and simple forms, navigation, authentication, and event creation.
Learn to implement authentication in a Rails app using the Devise gem, enabling user sign in, sign up, and identity tracking with installation steps from RubyGems.
Install and configure the devise authentication gem in a Rails project, generate the initializer and routes, and set up flash messages and development environment for use.
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.
Associate users and events, enforce authentication before any action, and authorize event ownership so only creators can edit or destroy their events via the GUI.
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.
Learn to show a user page that lists all events created by that user, with links to each organization's events and reverse chronological ordering by date.
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 authentication setup with Devise, including installation, configuration, and generating users. Explore events owned by a user, editing permissions, and adding custom fields via strong parameters, then prepare for authorization.
Learn to set up authorization in a Rails app with the pundit gem, generate policies, and enforce permissions for creating, updating, and destroying events.
Set up an authorization policy for events by generating an event policy that inherits from the application policy, and configure permissions to create, update, or destroy events.
Learn to implement policy-based authorization for events in a Rails app by defining application and event policies, authenticating users, and controlling access to index, show, create, edit, and destroy actions.
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.
Hide links from unauthorized users and reveal to authorized ones by applying authentication and authorization in a Rails app, using Pundit to define policies and enforce access control for events.
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.
Explore adding admin access to users by implementing an admin flag, migrating the database, and enforcing authorization rules so admins can manage events and other users.
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 an admin dashboard in a Rails project by wiring assets, stylesheets, and Bootstrap components, building navigation, links, and panels for users, events, categories, and interactions.
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.
Build an admin-restricted users view by creating an admin namespace, a users controller with an index action, and routes to list users and their events.
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.
Create a publicly accessible categories show page that lists all published events within a category, with proper routes and controller actions beyond the admin namespace.
List all categories on the page, link each name to its show page, and enable navigation to events via categories, laying groundwork for category and event associations.
This section adds an admin flag and dashboard, enables admin CRUD on categories, and introduces a category show page to list items published under each category.
Discover how to replace static, site-wide images with event-specific uploads. Apply per-event image display so each show page shows unique visuals rather than reusing a single asset.
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.
Upload the first image for an event and associate it with the event. Render the uploaded image on the show page when present and commit UI updates.
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.
We updated the missing field, verified no tracking after running, uploaded images, and blocked public access for untracked uploads as we prepare to explore search engine optimization and safe functionality.
Learn to build Rails friendly, user-friendly URLs that are optimized for search engines by converting ugly paths into clean, descriptive event URLs for better SEO.
Generate and configure friendly_id for events and categories, add slug fields and migrations, and update models and controllers to use slug-based lookups for user friendly urls.
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 a search feature in a Rails app using a search gem by building a view form and querying events in the index with keywords.
Implement a search engine optimization program called Friendly I.D. to enhance a user-friendly display. Install the syndicate gem to enable related functionality, with installation notes from the resources.
Implement a basic association by adding a category_id foreign key to events via a migration, with category has many events and event belongs to a category.
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.
Learn to implement an event registration system in Rails by creating a join table for events and users, establishing has_many through relationships, and wiring a register action via nested finances.
Learn to implement Rails event registration: load the event with before_action, require sign-in, allow a user to register for an event, display registrations on the user page, and prevent duplicates.
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.
Learn to manage event capacity in Rails by adding a seats field, building seats left methods, and conditionally rendering no seats or register actions in the view.
Configure the admin dashboard in Rails by implementing controllers, routes, and views for attendees, comments, and likes in the admin namespace.
Modify admin dashboard by styling and linking attendees, comments, and events; implement truncation and display of comment authors, and showcase events under categories for a functional admin interface.
Learn Rails gems to model events and categories with has_many and belongs_to, add comments with author attribution, and manage event registrations, capacity, and pagination.
Learn how to implement pagination in a Rails app using the pagination gem, dividing events into pages, configuring page size, and styling with Bootstrap.
Learn how to implement pagination in a Rails app using the paginate gem, configure per-page limits, and render paginated event lists on index pages.
Explore pagination to divide content in Rails projects and preview upcoming concepts like the like event and categorization.
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!