Ruby on Rails Level 2 Book

Step-by-Step Training Workbook:

Once you’ve got your feet wet with Ruby on Rails Level 1, this book provides excellent next steps for further learning. Complex use cases require complex solutions, and the Rails framework delivers powerful tools for solving them. This book demonstrates how to build an ecommerce website, complete with an administrative backend, a real-world product/cart/order data model, AJAX, API integrations, email order confirmations, and finally deployment and hosting using industry standard tools: Heroku and Amazon Web Services. Along the way you’ll also pick up some advanced nuances of Ruby that will help reduce the amount of code you have to write.

Includes Downloadable Class Files (works on Mac)
ISBN: 978-1-941333-12-9

Download Sample Exercise
Setup & Introduction
Downloading the Class Files
Before You Begin: Installing Ruby on Rails
  • Installing Command Line Tools
  • Installing Homebrew
  • Installing Ruby Version Manager (RVM)
  • Installing Ruby & Rails
Section 1
Setting Up: Do This Before Other Exercises!
  • Setting up your class files
Closures: Blocks, Procs, & Lambdas
  • Blocks
  • Writing methods that work with blocks
  • Procs vs. lambdas
Ruby Fundamentals: Inheritance, Mixins, & Modules
  • Inheritance
  • Overriding a parent class’s method
  • Calling a parent class’s method using super
  • Mixins & modules
Object Introspection
  • The class & superclass methods
  • The ancestors method
  • The is_a? & respond_to? methods
Extending Core Ruby Classes
  • Extending the string class
  • Adding a new method to the string class
Error Handling & Exceptions
  • Handling errors
  • Different types of errors
  • The raise method
Section 2
Getting Started with Active Admin
  • Installing the Active Admin gem
  • Logging in to Active Admin
  • Generating a resource
Customizing Product Images
  • Installing the Paperclip gem
  • Installing the ImageMagick image processor
  • Modifying the form
  • Customizing images
Product Images, SEO-Friendly Slugs, & Markdown
  • Installing the FriendlyId gem
  • Using slugs to create SEO-friendly URLs
  • Remaking the database
  • Using Markdown to make bulleted lists
Customizing Active Admin
  • Customizing the product columns
  • Customizing the filter sidebar
Section 3
Many-to-Many Relationships: Part One
  • The has_one relationship
  • The has_and_belongs_to_many relationship
Many-to-Many Relationships: Part Two
  • The has_many, through relationship
  • Setting quantity
  • Removing items
Adding Price Functionality to the Cart
  • Calculating the subtotal
  • Delegates
  • Fixing the order summary
  • Displaying the number of items in the cart
Advanced Model Relationships: Polymorphic
  • Polymorphic relationships
  • Making the checkout button functional
  • Adding an order model
  • Checking out & emptying the cart
Advanced Model Relationships: Self Joins
  • Self join relationships
  • Displaying related products
Section 4
Updating Quantities & Prices with AJAX
  • Adding an AJAX request
  • Disabling turbolinks
Web Services: Integrating a Third-Party
  • Installing the HTTParty gem
  • Adding Bitcoin total to the order summary
Web Services: Outgoing with JSON, XML, & CSV
  • Converting product info into JSON
  • Creating an XML file
  • Using Active Admin to export CSV
Confirmation Emails & Testing with MailCatcher
  • Installing & configuring MailCatcher
  • Creating a mailer
  • Sending the email
Deployment with Heroku & AWS S3
  • Creating Heroku & Amazon Web Services accounts
  • Adding the gems that Heroku needs
  • Configuring Paperclip to store images on Amazon S3
  • Setting up AWS S3: creating a bucket & security keys
  • Deploying our code to Heroku
  • Sending emails with Heroku’s SendGrid add-on
Bonus Material
The Making of That Nutty Guy: Page Layout
  • Creating the product model, view, & controller
  • Incorporating the designer’s HTML/CSS
  • Fixing the missing images & fonts
The Making of That Nutty Guy: Dynamic Content
  • Adding dynamic data
  • Rendering a partial
  • Validations
User Sign-In with the Devise Gem
  • Installing the Devise gem
  • Alerts
  • User logins
Managing Your Code with Git
  • Creating a new Git repository
  • Tracking changes & adding files
  • Committing code to Git
  • GitHub: pushing your code to the cloud
  • Committing a change to the repository
  • Cloning a repository
Reference Material
Basic Structure of Scaffolding

How our eBooks Work Buying eBooks for Someone Else

Examples of What You Learn

  • How to build an ecommerce website
  • Create an administrative backend
  • Use a real-world product/cart/order data model
  • Web Services: Outgoing with JSON, XML, & CSV
  • Confirmation Emails & Testing with MailCatcher
  • Deployment with Heroku & Amazon Web Services
  • And more...

Why Our Books Are Unique

Our books are packed with step-by-step exercises that walk you through projects. You’ll learn by doing exercises, not reading long explanations. The goal is to give you hands-on practice with the program, getting you started quickly with the things that are most important for real life work.

demonstration of different book formats: print, kindle, & mobile devices
Yelp Facebook LinkedIn YouTube Twitter Instagram