Skip to content

Instantly share code, notes, and snippets.

View jelaniwoods's full-sized avatar

Jelani Woods jelaniwoods

View GitHub Profile
@jelaniwoods
jelaniwoods / seeding.md
Last active December 8, 2020 15:53 — forked from raghubetina/seeding.md
Seeding your database

Seeding your database

It is very helpful to take the time to pre-populate your database with some dummy data before you start working on any features. It's nice to have some data to look at to see whether you are going down the right path.

It's also very helpful to other developers on the project, so they can get started quickly right after they clone.

Here are two ways to create seed data:

Manually + seed_dump

@jelaniwoods
jelaniwoods / dates.md
Last active March 21, 2019 20:57 — forked from raghubetina/dates.md
Dates Cheatsheet

Dates Cheatsheet

In this guide, I'll show you how I prefer to handle dates.

We'll

  1. use a gem called Chronic to intelligently parse a wide variety of user input into valid Dates,
  2. I'll also show you a gem that helps create nice looking datepicker controls,
  3. look at some built-in Ruby/Rails methods that help us format dates and times nicely for our users to look at.