$ rails g model User
belongs_to
has_one
Ruby Quickstart for Refugees: | |
-- | |
# is a comment. | |
You don't need semicolons. | |
Ruby aims to be elegant and readable, so punctuation and boilerplate are | |
minimal. | |
-- |
for (var i=1; i <= 20; i++) | |
{ | |
if (i % 15 == 0) | |
console.log("FizzBuzz"); | |
else if (i % 3 == 0) | |
console.log("Fizz"); | |
else if (i % 5 == 0) | |
console.log("Buzz"); | |
else | |
console.log(i); |
class AccountsController < ApplicationController | |
def update | |
@account = Account.find(params[:id]) | |
respond_to do |format| | |
if @account.update_attributes(account_params) | |
format.html { redirect_to @account, notice: 'Account was successfully updated.' } | |
else | |
format.html { render action: "edit" } | |
end |
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
.navbar | |
.caret | |
.label | |
.table | |
.img-responsive | |
.img-rounded | |
.img-thumbnail | |
.img-circle | |
.sr-only | |
.lead |
Press minus + shift + s
and return
to chop/fold long lines!
<%= f.collection_check_boxes :venue_ids, Venue.all, :id, :name, checked: Venue.all.map(&:id) do |b| %> | |
<span> | |
<%= b.check_box %> | |
<%= b.label %> | |
</span> | |
<% end %> |
Try Git | Markdown Cheatsheet | Pro Git | Git Config
Getting Started
In the terminal start by creating a new directory, then run git init
to initialize a git repository