Skip to content

Instantly share code, notes, and snippets.

@flonath
flonath / index.md
Last active April 4, 2016 15:18 — forked from rstacruz/index.md
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

01:38,39,69,71,73,74
02:08,51,59,60,77,80
03:18,23,42,58,63,71
04:05,06,26,83,84
05:04,26,38,73
06:04,83
07:26,30,38,42,43,48,84
08:02,51,55
09:11,31,66
10:21,51,52,77,89
@flonath
flonath / example.js
Created September 10, 2013 06:09
Welcome to your first Gist! Gists are simple code reminders. Whenever you come across a piece of code you think might be useful later on, save it as a Gist. With GistBox, you can also tag the Gist with a label. This is especially useful for keeping them organized by language, project or purpose. For more info about GistBox, visit: http://www.gi…
// log an object to the browser console
console.log({ text: "foobar" });