Skip to content

Instantly share code, notes, and snippets.

@louisscruz
louisscruz / rails_5_update.md
Last active July 13, 2017 05:54
Rails 5 Update

Upgrading Rails Projects

These instructions will step you through the process of upgrading a project from Rails 4 to Rails 5.

Before doing any of the following, ensure that you have Rails 5.1.2 installed (rails -v). If not, run gem install rails -version=5.1.2.

Let's call the existing Rails 4 project OP (Old Project), and the new Rails 5 project NP (New Project). The steps are as follows.

Workflow

@louisscruz
louisscruz / reddit_on_rails_update.md
Last active July 13, 2017 05:55
Reddit On Rails Notes

Reddit on Rails Update

What follows are the things I had to do to update the Reddit on Rails project to Rails 5.

Create A New Project

rails new reddit_on_rails --database=postgresql
@louisscruz
louisscruz / create_account
Created October 23, 2017 20:06
create_account
#!/bin/sh
COUNT_FILE=~/Code/zendesk/scripts/create_account/create_account_count.txt
create_count_file() {
echo '1' > $COUNT_FILE
}
ensure_count_file() {
if [ ! -f $COUNT_FILE ]; then

ESLint Rules

I went through all of the ESLint rules and noted the ones that we might want to implement.

I did my best to make sure that there's no overlap between these rules and the ones already in the recommended sets, but some may have slipped through.

Higher Priority

Basic ESLint

{"createdAt":"2018-11-07T16:19:11Z","css":[{"name":"vendor","path":"/agent/assets/vendor-70421189cb1cfd0ff188a220812505c1.css"},{"name":"application","path":"/agent/assets/application-e85e9d84b865790d32f7be2332f748b2.css"},{"name":"elements","path":"/agent/assets/elements-fb564a9a5c55cf0f2aeaa524ae8edc29.css"},{"name":"styles.css","path":"/agent/assets/lr/styles.a711c7533be25a4d.css"}],"js":[{"name":"vendor","path":"/agent/assets/vendor-8c708a93884b764415e218b433918405.js"},{"name":"application","path":"/agent/assets/application-1d12f5e6cefccc40133c75d038ee5e96.js"},{"name":"async.commons.js","path":"/agent/assets/lr/async.commons.87b5c24ced158e96.chunk.js"},{"name":"agent/assets/lr/2.2626848afe0dd538.chunk.js","path":"/agent/assets/lr/2.2626848afe0dd538.chunk.js"},{"name":"agent/assets/lr/3.9a72823b3d2b7210.chunk.js","path":"/agent/assets/lr/3.9a72823b3d2b7210.chunk.js"},{"name":"agent/assets/lr/4.64ba6869ee5282ea.chunk.js","path":"/agent/assets/lr/4.64ba6869ee5282ea.chunk.js"},{"name":"agent/assets/lr/5.1d6