Skip Navigation Links

Course Length:
2 Days
Course Description:
This course describes how to write database-backed Web Applications using the Ruby on Rails (also pronounced RoR, or Rails) Framework. Students are taken through the various steps of creating a full-fledged Web Application. Topics include the MVC paradigm, object relational mapping, fill in forms, sessions, validation techniques, testing, and various other Rails topics.
Who Should Attend:
A typical student in this course has either been tasked with writing a Rails application, or has been tasked with evaluating the Rails framework. Thus, this course should be attended by developers and managers alike, and possibly system administrators.
Benefits of Attendance:
Upon completion of this course, students will be able to:
  • Download and install Rails along with various other products that allow one to write Rails applications
  • Understand the Model, View, Controller paradigm and how this applies to Rails applications
  • Understand the directory structure of a Rails application
  • Build non-trivial database backed Web Applications
  • Understand the ActiveRecord classes and how they wrap database tables
  • Understand the interplay between various controller actions and .erb (embedded Ruby) files
  • Understand the Create, Read, Update, and Destroy (CRUD) paradigm
  • Validate Model data
  • Use the Rails console to debug applications
Prerequisites:
Students should have been through a course in the Ruby Programming language. They should also have an understanding of HTML. Students should also have experience with a SQL compliant database such as MySQL.
Course Outline:
  • Chapter 1: An Overview Of Ruby on Rails
    1. What is Ruby on Rails?
    2. Overview of Rails Components
    3. Installing Rails
    4. A Simple Rails Application
    5. Starting the Rails Server
    6. Static Pages Within a Rails Application
    7. The Structure of a Rails Application
    8. Generating a Controller
    9. Rendering the View
    10. Adding a Static Page
    11. Dynamic Pages with Embedded Ruby
    12. Using the render Method
    13. Using the link_to Method
  • Chapter 2: Rails and HTML Forms
    1. A Basic HTML Form
    2. Processing an HTML Form
    3. Working With Form Data
    4. Other Form Elements
    5. Form Tag Helpers
  • Chapter 3: Databases and Rails
    1. Review of the MVC Architecture
    2. Entities and Relationships
    3. Databases and Models
    4. Rails Database Conventions
    5. Adding a Model
    6. Database Migrations
    7. The Rails Database Console
    8. Creating a Rails View of a Database Table
    9. Scaffolding
    10. RESTful Routes and Resources
  • Chapter 4: Form Helpers and Validation
    1. Introduction
    2. Form Helpers and form_for
    3. Processing Form Helpers
    4. From Form to Database
    5. Redirection
    6. Data Validation
    7. Validation Helpers
    8. The presence Validator
    9. The numericality Validator
    10. The uniqueness Validator
    11. The length Validator
    12. The format Validator
    13. Custom Validation Methods
    14. The errors Object
    15. Displaying Validation Errors in the View
  • Chapter 5: Adding Style to an Application
    1. Styling
    2. Rails and Sass
    3. Cascading Style Sheets
  • Chapter 6: Users
    1. Introduction
    2. Configuring an Application for Sessions
    3. Registering Users
    4. The Register Action
    5. The flash Hash
    6. Validating the Registration
    7. Logging in
    8. Logging Out
    9. Protected Pages
    10. Filters
  • Chapter 7: Putting it All Together
    1. Introduction
    2. The Business Application
    3. Database Terminology
    4. Linking Two Models
    5. Adding Tasks
    6. The Database Tables
    7. Displaying Employee Tasks
    8. Deleting a Task
    9. Listing Employees and Tasks
    10. Migrations
    11. Editing a Record
    12. Summary