Skip to content

Instantly share code, notes, and snippets.

CRUD stands for Create Read Update Delete. CRUD actions align with controller HTTP verbs and controller actions in a Rails app.
CRUD Action HTTP Verb Rails Action(s)
Create POST create
Read GET new/show/index/edit
Update PUT/PATCH update
Delete DELETE destroy
cd blocipedia
ls -la
cd log
ls -la
tail test.log
tail -f test.log
Rails.logger.info
The list of keyboard shortcuts can be found in the NetBeans Wiki.
Turn On/Off Search Result highlights
Alt + Shift + H
Add/remove comment. Should work for all languages
Ctrl + / or in mac ⌘ + /
repl.it - an online, interactive Ruby shell. It is a full-feature terminal emulator that lets you experiment with and execute Ruby code.
https://repl.it/languages/Ruby
$ git push heroku master
$ heroku run rake db:migrate
git remote -v
$ alias rs="rails s -p $PORT -b $IP"
$ rs
https://js-foundation-mbattur.c9users.io:8080/
jekyll serve --host $IP --port $PORT --baseurl ''
Before Each Checkpoint
$ git status
$ git checkout -b checkpoint-23-interfaces
Switched to a new branch 'checkpoint-23-interfaces'
After Each Checkpoint
$ git status
$ git add .
$ git status
$ git commit -m "Checkpoint 23 completed, interfaces"
$ heroku login
$ heroku create
$ git push heroku master
WITH DESCRIPTION
Deploying to Heroku
It is time to deploy and share your app with the world. There are many choices for deploying and hosting Rails applications, and Bloc recommends the popular Heroku platform. Heroku makes it easy to manage and deploy Rails apps using the command line.
[16] pry(#<Post>):1> self
=> #<Post:0x000000039e3d08
id: 1,
title: "my new title",
body: "my new body",
created_at: Tue, 13 Oct 2015 21:49:28 UTC +00:00,
updated_at: Wed, 14 Oct 2015 21:26:30 UTC +00:00>