I hereby claim:
- I am jeremyw on github.
- I am jeremyweiskotten (https://keybase.io/jeremyweiskotten) on keybase.
- I have a public key ASAKeU7JEDXcjrLckfYecyVqvo2xKcTWaUVq6fbDFWMo5go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| { | |
| "data":[ | |
| { | |
| "happy":true, | |
| "created_at":"2020-01-01T05:10:30Z" | |
| }, | |
| { | |
| "happy":false, | |
| "created_at":"2020-01-02T13:00:00Z" | |
| }, |
| 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 |
| def given(object) | |
| yield(object) if object | |
| end | |
| given(Model.find_by_id(1)) { |obj| operate_on(obj) } |
| class Array | |
| def sum | |
| inject(0) { |sum, value| sum += value } | |
| end | |
| def average | |
| sum.to_f / size | |
| end | |
| end |
| :plain | |
| <!-- | |
| testing | |
| this is a multiline comment | |
| hello | |
| indent | |
| --> |
| / | |
| this is a | |
| multiline | |
| comment |
| public class Car { | |
| public static class Builder { | |
| private int year; | |
| private String make; | |
| private String model; | |
| private String color; | |
| public Builder year(int year) { | |
| this.year = year; return this; | |
| } |