Ruby Roadmap

The following is a roadmap for setting up a data driven website project from scratch to webserver deployment.

  1. Decide main Objects (e.g. Subject, Pages) and relationships (1:1, 1: many)
  2. Database Setup
    1. Tables and relationships
  3. Models Setup
    1. Generate rails controller
      1. Instance Variable. Here we are setting up initially the index action, which will get things set up for the template. So it will go to the database and retrieve all the data (e.g. pages/subjects). This is done by setting up an instance variable, e.g. @pages = Page.order(‘position ASC’), which would pull all pages from the pages table and order them ascending. The @pages instance variable is now available to the template and since the template will be called the same name we do not have to specify which template needs to access the instance variable.
      2. Template. App>Views>Pages
      3. Other Resources to Learn from API Guide, Guides