Triple backticks are used to open and close code blocks. The triple backticks need to be on their own line:
puts "hello world"
And here is another, separate code block. Triple backticks open and close it:
puts "line 1"
Triple backticks are used to open and close code blocks. The triple backticks need to be on their own line:
puts "hello world"
And here is another, separate code block. Triple backticks open and close it:
puts "line 1"
require 'rails_helper' | |
RSpec.describe TodosController, :type => :controller do | |
describe "GET #index" do | |
#describe "POST #create" do | |
#describe "GET #show" do | |
#describe "PATCH #update" do (or PUT #update) | |
#describe "DELETE #destroy" do | |
#describe "GET #new" do |
SSH to the vagrant OS command line.
Terminal $> vagrant ssh
Login to postgres database as vagrant user with the psql client:
vagrant@rails-dev-box: psql -U vagrant postgres
text
(String, Regexp)
— Only find elements which contain this text or match this regexpvisible
(Boolean, Symbol)
— Only find elements with the specified visibility:
true
- only finds visible elements.false
- finds invisible and visible elements.:all
- same as false
; finds visible and invisible elements.:hidden
- only finds invisible elements.:visible
- same as true
; only finds visible elements.count
(Integer)
— Exact number of matches that are expected to be found(function() { | |
var CSRFToken, Click, ComponentUrl, EVENTS, Link, browserCompatibleDocumentParser, browserIsntBuggy, browserSupportsCustomEvents, browserSupportsPushState, browserSupportsTurbolinks, bypassOnLoadPopstate, cacheCurrentPage, cacheSize, changePage, clone, constrainPageCacheTo, createDocument, currentState, enableTransitionCache, executeScriptTags, extractTitleAndBody, fetch, fetchHistory, fetchReplacement, historyStateIsDefined, initializeTurbolinks, installDocumentReadyPageEventTriggers, installHistoryChangeHandler, installJqueryAjaxSuccessPageUpdateTrigger, loadedAssets, manuallyTriggerHashChangeForFirefox, pageCache, pageChangePrevented, pagesCached, popCookie, processResponse, recallScrollPosition, referer, reflectNewUrl, reflectRedirectedUrl, rememberCurrentState, rememberCurrentUrl, rememberReferer, removeNoscriptTags, requestMethodIsSafe, resetScrollPosition, setAutofocusElement, transitionCacheEnabled, transitionCacheFor, triggerEvent, visit, xhr, _ref, | |
__indexOf = [].indexOf || funct |
source 'https://rubygems.org' | |
def ruby_version | |
version_file = ".ruby-version" | |
version_override = (File.exist?(version_file) && File.read(version_file).strip) | |
default_version = "2.1.5" | |
version_override || default_version | |
end | |
ruby ruby_version |
// Wrap in anonymous function to avoid adding variables to global scope needlessly. | |
(function($) { // $ is jQuery | |
function addTodoToDOM(data) { // 'data' is object built from response JSON | |
// id will be needed when adding delete functionality dynamically. | |
// var todoId = data.todo.id; | |
// Add HTML for new todo to document | |
var tableRow = '<tr><td>' + data.todo.description + '</td></tr>'; |
// Generated originally with `ember g http-mock todos`, | |
// then customized so JSON body parsing is available. | |
module.exports = function(app) { | |
var express = require('express'); | |
var todosRouter = express.Router(); | |
// Install body-parser: `npm install --save-dev body-parser` | |
// Body parser needed so req.body is | |
// available to router endpoints as JS object. |
#!/bin/bash | |
# Add to your .bashrc on Mac OSX, then run camfix in Terminal | |
# if the Mac's built-in camera stops working. | |
# Thanks to: http://osxdaily.com/2013/12/27/fix-there-is-no-connected-camera-error-mac/ | |
alias camfix='sudo killall VDCAssistant; sudo killall AppleCameraAssistant' |
Run rails new --help
to view all of the options you can pass to rails new
:
$ bin/rails new --help
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/eliot/.rbenv/versions/2.2.0/bin/ruby