Skip to content

Instantly share code, notes, and snippets.

View thefactus's full-sized avatar
programming

Pablo Bello thefactus

programming
  • Smart Pension
  • London
  • 15:03 (UTC +01:00)
View GitHub Profile
class User < ApplicationRecord
has_many :user_todo_lists
has_many :todo_lists, through: :user_todo_lists
has_many :todos, through: :todo_lists
end
class UserTodoList < ApplicationRecord
belongs_to :user
belongs_to :todo_list
end
@thefactus
thefactus / docker-pry-rails.md
Created February 11, 2021 19:15 — forked from briankung/docker-pry-rails.md
Using pry-rails with Docker

First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails

gem 'pry-rails', group: :development

Then you'll want to rebuild your Docker container to install the gems

@thefactus
thefactus / postgres-brew.md
Created October 18, 2020 16:17 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update