Skip to content

sacruby/bootcamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SacRuby Rails Bootcamp

Presented by Mobirobo (http://www.mobirobo.com/rails-bootcamp)

Introduction

This seminar is an extremely condensed introduction to Ruby on Rails. The intent is to familiarize you with some of the basic functions of Rails, and if you are participating in Startup Weekend events, you may have enough to leverage the framework.

As such, this intro skips around a bit as we build a basic app.

Tool set

  • Ruby 2.0
  • Rails 4
  • Postgresql
  • Ruby Gems
  • Bundler
  • Heroku

The Project

We are building a hack-a-thon prototype for a stolen bike reporting site. There have been a rash of bike thefts in the Sacramento area. FindMyBike will be a place unfortunate victims can use to register lost bikes, and hopefully others can start to see hot spots of theft as well as report bike sightings.

The project will be "sketched out" in this abbreviated bootcamp. Check out one of our full length classes to dive into a more comprehensive treatment of the project.

We will split this session into 4 parts:

Part 1

  • Make sure our machines are set up
  • Pair up as desired
  • Create basic Rails app
  • Create a git (version control) repo
  • Map out the app
  • Create some static pages

Lab 1

  • Create content for home and about page
  • Add contact-us page
  • Change the styles to your own color scheme
  • Add a simple navigation menu to each page using bootstrap
  • Add a shared footer in the layout

Part 2

  • MVC
  • More Views and Partials -- build map
  • Helpers -- marker helper
  • Controllers and Routing -- setup data and examine URLs
  • Generators -- save time
  • Generate Models following RESTful techniques, Scaffold

Lab 2

  • Use rails generator to go back and add a Contact model with name, email, phone, and message
  • Use the form that was generated by scaffolding, and put it on contact us page (use the partial)
  • Confirm that you can submit a contact from the public page

Part 3

  • Database Modeling, Relations
  • User Model and Code Reuse From Gems (Devise)
  • Adding Accounts (Authentication)
  • Adding Access Control to Bike Controller
  • Linking Models Together, applying Relations
  • Misc -- Flash message

Lab 3

  • Add top user signin/register nav bar widget
  • Change to signout and custom greeting when logged in
  • Fix formatting of registration flow
  • Typing lat and long is a pain, let’s use a gem: geocoder for the bike model

Part 4

  • Creating a real Admin backend (ActiveAdmin)
  • Deploying to Heroku

Lab 4

  • Create admin model for contacts
  • Test that non-admins can’t get into admin control panel
  • Add link for admins to get to dashboard when logged in
  • Deploy your app

Resources

Code Snippets

Part 2

Part 3

Part 4

About

Startup Weekend Rails Bootcamp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published