Skip to content

Instantly share code, notes, and snippets.

View franciscomxs's full-sized avatar
🏠
Working from home

Francisco Martins franciscomxs

🏠
Working from home
View GitHub Profile
@franciscomxs
franciscomxs / ubuntu_steps.sh
Created July 5, 2012 17:06 — forked from johnrees/_ubuntu_steps.sh
Standard Rails 3.* setup for Ubuntu 10.04 LTS 32
# As root user
# Update the OS
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
# Setup Hostname & TimeZone
echo "{{HOSTNAME}}" > /etc/hostname
hostname -F /etc/hostname
dpkg-reconfigure tzdata

Arel Cheatsheet on Steroids

A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.

Tables

posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord

Table alias