Skip to content

Instantly share code, notes, and snippets.

View StevenClontz's full-sized avatar

Steven Clontz StevenClontz

View GitHub Profile
@StevenClontz
StevenClontz / gist:1eb76f761b9114858238dd62d21740a5
Last active January 18, 2018 21:33 — forked from wrburgess/gist:2187164
Setting up a Rails has_many :through relationship with meaningful relationship table #rails #activerecord #relations

Create Models

Create tables:

  • bin/rails g model Location name:string
  • bin/rails g model User name:string
  • bin/rails g model Checkin

Run migration:

  • bin/rails db:migrate

Capybara

save_and_open_page

Matchers

have_button(locator)
@StevenClontz
StevenClontz / older_bash_prompt.sh
Last active April 6, 2016 03:47 — forked from insin/bash_prompt.sh
Older bash prompt
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.