Skip to content

Instantly share code, notes, and snippets.

@cboutter
cboutter / gist:fc38425138ee110a205bbeacb484473d
Created October 14, 2017 12:26 — forked from arjunvenkat/gist:1115bc41bf395a162084
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

@cboutter
cboutter / emacs_commands.md
Created August 28, 2012 12:47
Useful emacs commands

Simple Edit Commands

Cut C-w
Copy M-w
Paste C-y
Kill Word M-d

Advanced Edit Commands