Skip to content

Instantly share code, notes, and snippets.

View jmadden's full-sized avatar
☘️

Jim Madden jmadden

☘️
View GitHub Profile

Spree Commerce Notes

Run the following when Spree has made updates: bundle exec rake railties:install:migrations

Rails Basics – A Quick Reference Guide

This document is meant to server as a jumping off point and reference guide for anyone that is new to programming in Rails. This document will have some very basic concepts and may be useful for anyone needing a quick jog of the memory when developing apps on Rails. This document is not a complete review of Rails and everything the framework offers.

NOTE: If you are using this document you should have a basic understanding of how to use terminal/commandline, irb and how to install Ruby Gems and Rails.

Table of Contents

Ruby Basics – A Quick Reference Guide

Introduction

This document is meant to server as a jumping off point and reference guide for anyone that is new to programming in Ruby. This document will have some very basic concepts and may be useful for anyone needing a quick jog of the memory when first branching out(Git pun intended) into the brave new world of developing with Ruby. This document is not a complete review of Ruby and everything the language offers.

NOTE: If you are using this document you should have a rudimentary understanding of how to use terminal/commandline, irb and how to install Ruby Gems.

Working with variables

String interpolation vs. concatenation

In the following example we declare an age variable and then print it out to the screen in two different ways. The first way uses string interpolation, the second uses string concatenation.

age = 40