Created
November 16, 2012 17:02
-
-
Save plapier/4088995 to your computer and use it in GitHub Desktop.
Revisions
-
Phil LaPier revised this gist
Nov 16, 2012 . 1 changed file with 12 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,9 +4,19 @@ 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 -
Phil LaPier created this gist
Nov 16, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ #Rails ####Generate a controller and action rails generate controller <controller name> <action> ####Change layout for controller render :layout => 'special_layout' #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");