Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jordan Brough
committed
May 8, 2010
1 parent
b4c9bb3
commit cf04b80
Showing
10 changed files
with
70 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
class HomeController < ApplicationController | ||
def index | ||
end | ||
|
||
def hello_world | ||
respond_to do |format| | ||
format.html | ||
format.pdf do | ||
render(:pdf => "hello world", | ||
:layout => 'pdf') | ||
end | ||
end | ||
end | ||
end |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
class SamplesController < ApplicationController | ||
def hello_world | ||
respond_to do |format| | ||
format.html | ||
format.pdf do | ||
render(:pdf => "hello world", | ||
:layout => 'pdf') | ||
end | ||
end | ||
end | ||
|
||
def columns | ||
respond_to do |format| | ||
format.html | ||
format.pdf do | ||
render(:pdf => "columns", | ||
:layout => 'pdf') | ||
end | ||
end | ||
end | ||
end |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<ul> | ||
<li><%= link_to 'hello world html', hello_world_path %></li> | ||
<li><%= link_to 'hello world pdf', hello_world_path(:format => 'pdf') %></li> | ||
<li><%= link_to 'hello world html', samples_path('hello_world') %></li> | ||
<li><%= link_to 'hello world pdf', samples_path('hello_world', 'pdf') %></li> | ||
</ul> |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<%= stylesheet_link_tag "application" %> | ||
<%= yield :head %> | ||
</head> | ||
<body> | ||
<div id="content"> | ||
<%= yield %> | ||
</div> | ||
</body> | ||
</html> |
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<% content_for :head do %> | ||
<style type="text/css" media="screen"> | ||
.section { | ||
width: 600px; | ||
} | ||
.section h2 { | ||
text-align: center; | ||
} | ||
.section div { | ||
-webkit-column-count: 2; | ||
-webkit-column-gap: 20px; | ||
} | ||
</style> | ||
<% end %> | ||
|
||
<div class='section'> | ||
<h2>Writing in columns</h2> | ||
<div> | ||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | ||
<p>In sed augue mi. Curabitur tristique justo a velit convallis vel viverra tellus cursus. Aenean tristique nunc eu ipsum porta at dictum ipsum sagittis. Aliquam erat volutpat. Ut non dui nec arcu mollis malesuada. Aliquam est elit, consequat et scelerisque ac, rhoncus eu est. Fusce adipiscing, lorem et ultrices pellentesque, ipsum tortor adipiscing ligula, a volutpat diam est vitae augue. Ut consequat condimentum lacus et vestibulum. Duis nisl arcu, tincidunt ut mollis nec, adipiscing ac ante. Sed facilisis, dui at consequat elementum, massa lorem rhoncus augue, sit amet imperdiet felis ante non nisl. Sed laoreet vestibulum purus vitae bibendum. Nullam in congue justo. Sed tincidunt tempor eros in laoreet. Donec vel nisi in mauris venenatis tempor. Curabitur varius vulputate tortor, a vulputate justo euismod semper. Duis sollicitudin scelerisque neque, at adipiscing massa interdum non. Quisque consequat tortor quam, vel tristique tellus. Nam blandit sollicitudin dui, quis egestas nibh malesuada non.</p> | ||
<p>Vestibulum dolor felis, tempus viverra posuere ut, lacinia vitae mi. Aenean sit amet diam at erat accumsan dictum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin auctor, est eu tincidunt dictum, felis nisl tempus lectus, vulputate blandit neque leo vitae diam. Duis at urna augue, eu rhoncus nunc. Donec pulvinar adipiscing mi sed rutrum. Mauris gravida, orci vel feugiat consequat, odio dui laoreet erat, ut mattis lorem velit congue mi. Donec mattis imperdiet orci, at pretium arcu sollicitudin ut. Cras laoreet tempus suscipit. Curabitur tristique, mi a interdum aliquet, lacus sapien rhoncus turpis, a porttitor mi enim vel ligula. Proin et nulla tellus. Aliquam erat volutpat. Donec vitae orci in dui suscipit pharetra. Maecenas tincidunt porta aliquet.</p> | ||
</div> | ||
</div> |
File renamed without changes.
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
ActionController::Routing::Routes.draw do |map| | ||
map.root :controller => 'home' | ||
|
||
map.hello_world 'hello_world.:format', :controller => 'home', :action => 'hello_world' | ||
map.samples 'samples/:action.:format', :controller => 'samples' | ||
end |
Empty file.
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require 'test_helper' | ||
|
||
class SamplesControllerTest < ActionController::TestCase | ||
# Replace this with your real tests. | ||
test "the truth" do | ||
assert true | ||
end | ||
end |