
Build a superhero name generator with Ruby on Rails, connecting to a third party API, and manipulating results in the controller to learn Rails basics and development workflow.
Check out my student Facebook Group...
It's a great place to get fast support for this course from me, to interact with other students, to post your projects and code, and to access course announcements and extras...
Join Now!
https://www.facebook.com/groups/codemycom/
Install Ruby on Rails on Windows by downloading Node, a text editor, a terminal such as Git Bash, and the Heroku toolbar, then install Rails in upcoming videos.
Install node.js to ensure ruby on rails compatibility. Uninstall old versions, download the latest lts, install, restart your computer, then prepare for the text editor and bash terminal.
Install Sublime Text or your preferred editor and set up the Git Bash terminal, then generate an SSH key to connect to GitHub and Heroku for version control and hosting.
Install the Heroku toolbelt to connect your terminal with Heroku's Ruby on Rails hosting, verify installation, and ensure path and dependencies like node are set for smooth deployment.
RailsInstaller.org is down, you can find the installer here:
https://web.archive.org/web/20210306035811/http://railsinstaller.org/en
Create a new Rails project named hero and adjust sqlite3 to a version less than 1.4. Run the Rails server to view the default Rails page locally.
Learn to set up version control with git, configure global user name and email, initialize a repository, commit changes, and prepare for syncing with GitHub.
Set up a GitHub repository, sign up for GitHub, and understand public versus private options. Connect Cloud9 to GitHub, add an SSH key, and push code from the command line.
Learn to build a Rails web page by creating a view, a controller, and a route, then generate them with Rails generator and enable live updates in erb-powered HTML.
Create a second web page by adding a team controller and a team view (team.html.erb), wire it via a config routes file, and adjust the home page accordingly.
Explore how the application.html.erb layout uses yield and embedded ruby to render content on every page and supports a global navigation bar.
Learn how to create dynamic links in Rails using embedded Ruby and link_to with paths like home_path and home_team_path.
Learn to build and render a Rails partial for the navigation bar using embedded Ruby, place it in views with an underscore name, and reuse it across all pages.
Install bootstrap in a Rails app by adding the bootstrap-sass gem to the Gemfile, run bundle install, configure assets and JavaScript, restart the server, and verify styling changes.
Create a Bootstrap nav bar by copying it into a partial and loading it across pages. Refine links with embedded ruby and root_path, and note to avoid Bootstrap 4 beta.
Wrap content in bootstrap containers, use panels with headings and footers, and convert navigation links into panel links, preparing for mobile-first styling in the next video.
Add one line of code to the head to set the viewport with Bootstrap, making your site mobile-ready and enabling device previews in dev tools.
Learn the Ruby programming language from scratch and see how it powers Rails controllers, linking Ruby code to web pages and preparing you to work with the controller and views.
Explore variables in Ruby, learn naming rules with underscores, and how to store and modify values. Understand strings, numbers, puts, and operations, including type changes and treating variables as containers.
Explore how conditional statements in Ruby work, including if, else, and elsif, with practical examples of comparison operators, end blocks, and equality tests.
Explore how hashes store key-value pairs with curly braces, unlike arrays with numeric indexes, and access a value by its key (for example john's pepperoni or mary's cheese) for data.
Learn how to use a while loop in Ruby with a counter, a less than 10 condition, and numb plus equals 1 to avoid an infinite loop.
Discover how the Ruby each loop iterates over ranges and arrays with blocks, creating ranges like 1..5 and printing items. See how Rails uses each loops when handling database data.
Explore Ruby methods: define, call, and return values, pass arguments, manage scope, and control program flow with def and end blocks, and observe how argument counts affect execution.
Explore how Ruby classes act as blueprints, using initialize to set instance variables and instantiate with new to create a square object defined by side length, with uppercase class names.
Define a square class with an area method using the side length to compute area, and note Rails handles getters and setters for you.
Explore class inheritance in Ruby by creating a blue class that inherits from square, using inherited methods like area and color, with proper initialization in Rails.
Learn how Rails controller filters work, using before_action to share data across actions by defining a common_content method and ensuring instance variables are accessible in multiple views.
Install and update the Faker gem, then generate a superhero name and power in the Rails controller using instance variables and display them in the view with embedded Ruby.
Learn to generate realistic data with the Faker gem in Ruby on Rails, creating superhero names, powers, and corporate buzzwords, and move Ruby logic into the controller for cleaner views.
Explore generating avatars with Faker gem and the RoboHash API, randomly choosing robots, monsters, robot heads, or kittens with two backgrounds, sized at 300 by 300, and loaded on load.
Explore faker avatar variables in Ruby on Rails by generating random avatars with Ruby's rand, and toggle set numbers and backgrounds to vary avatars on each page reload.
Create a dynamic avatar image in a Rails view by building a random URL and rendering it with an embedded ruby image tag, using simple ruby conditionals and loops.
Create a dynamic team form that lets users select a number from 1 to 10 and generates that many items on the page, demonstrating Rails form processing.
Explore building Rails forms using form helpers and embedded Ruby, compare get and post methods, and reference the official Rails guides to implement form fields and layout.
Add a select tag to a Rails form and configure its options as a string array. Name the input, set a team number variable, and apply form-control styling with bootstrap.
Create a post route to the home controller's team action and wire it in config/routes.rb. The lecture covers Rails routing basics and points to Rails guides.
Learn how forms send data to Rails via params, how the controller receives the parameter, assigns an instance variable, converts it with to_i, and renders the result.
Manage form conditionals in Ruby on Rails using embedded Ruby to distinguish first page load from form submission. Display outcomes from the team number check and plan a neater flow.
Develop a dynamic team view by looping to render multiple team member partials with a dot times iterator, a bootstrap grid, and horizontal rules to display the selected count.
Explains debugging team looping in a Rails app by showing how instance variables are set in the home controller and moving looping logic to the show page.
Master embedding Ruby to render looping avatars in a Rails view, refine variable usage, and debug erb templates before deploying to production.
Learn to set up a custom domain for a Heroku-hosted app by adding the domain in Heroku and updating DNS at your registrar to point to Heroku for scalable hosting.
Unlock lifetime access to 60+ courses for a one-time $49 after a $200 discount, including PDFs and completion certificates, with a 30-day money-back guarantee.
In this course we'll learn how to build apps (web sites) with Ruby on Rails.
We'll build this fun little superhero name generator website that will allow us to connect with a third party API to generate data and images, then we'll learn how to manipulate that on our app.
I'll also teach you the Ruby programming language. Most people get Ruby on Rails and Ruby confused, but they're two different things. Rails is a web framework for building apps, Ruby is a programming language...we'll learn both in this course!
We'll also really dive into the the Rails controller (the "C" in the Rails MVC system). Learning how to work with the Controller gives you all kinds of power over your app to do really cool things.
Finally, we'll also learn how to use the hugely popular Bootstrap CSS framework to style our app. Bootstrap is easily the most popular CSS framework in the world, and you'll learn everything you need to use it right here in this course.
If you already know a little Ruby on Rails, this course will make you a much stronger developer. If you've never seen or used Rails at all; you'll fit right in too! I take things slow and explain absolutely everything you need to know!
See you inside!
-John Elder