#Rails
####Generate a controller and action
rails generate controller <controller name> <action>
####Change layout for entire Controller
class ProductsController < ApplicationController
layout "inventory"
end
####Change layout for Controller ACTION
class ProductsController < ApplicationController
def index
render :layout => 'special_layout'
end
end
#HTML.ERB
####Create a link
<%= link_to “Go Home”, root_path %>
####Wrap in a link
<%= link_to root_path, :id => "root" do %>
<img />
<% end %>
####Repeat elements
<% 3.times do %>
<li></li>
<% end %>
####Render a partial
<%= render 'sidebar' %>
####Insert and image using the asset pipeline
<%= image_tag("foo.png") %>
####Linking Javascript assets
<%= javascript_include_tag "main", "columns" %>
####Linking Stylesheet assets
<%= stylesheet_link_tag "main", "columns" %>
#CSS
####CSS Image Assets
background: image_url("image.png");