Skip to content

Commit 53c099d

Browse files
committed
assignment task schneems#3 completed
1 parent 831bc43 commit 53c099d

3 files changed

Lines changed: 61 additions & 3 deletions

File tree

public/index.html

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
1-
<h1> Hello</h1>
1+
2+
3+
<html>
4+
<body>
5+
<h1>You're using a layout</h1>
6+
<p>
7+
<h3> I'm a header</h3>
8+
<p>Put things in the header</p>
9+
<a href='me.html'>Me</a>
10+
<a href='http://www.gmail.com'>This is a link to gmail</a>
11+
12+
</p>
13+
<hr />
14+
<div>
15+
<h1> Hello</h1>
216
<p>
317
The time is now:
4-
2012-10-21 16:47:57 -0400
18+
2012-10-21 17:08:01 -0400
519
</p>
620

721
<p>
822
My Name is:
923

1024
</p>
1125

26+
27+
</div>
28+
<hr />
29+
<div>
30+
<h3> I'm a footer</h3>
31+
<p>Put things in the footer</p>
32+
<a href="http://google.com">Assignment task #3 told me to add this link to google.</a>
33+
<a href='http://google.com'>This is a link to google</a>
34+
</div>
35+
</body>
36+
</html>

public/me.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,25 @@
1-
foo
1+
2+
3+
<html>
4+
<body>
5+
<h1>You're using a layout</h1>
6+
<p>
7+
<h3> I'm a header</h3>
8+
<p>Put things in the header</p>
9+
<a href='me.html'>Me</a>
10+
<a href='http://www.gmail.com'>This is a link to gmail</a>
11+
12+
</p>
13+
<hr />
14+
<div>
15+
foo
16+
</div>
17+
<hr />
18+
<div>
19+
<h3> I'm a footer</h3>
20+
<p>Put things in the footer</p>
21+
<a href="http://google.com">Assignment task #3 told me to add this link to google.</a>
22+
<a href='http://google.com'>This is a link to google</a>
23+
</div>
24+
</body>
25+
</html>

views/layouts/application.html.erb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1+
<%
2+
def link_to(name, url)
3+
return "<a href='#{url}'>#{name}</a>"
4+
end
5+
%>
6+
17
<html>
28
<body>
39
<h1>You're using a layout</h1>
410
<p>
511
<h3> I'm a header</h3>
612
<p>Put things in the header</p>
713
<a href='me.html'>Me</a>
14+
<%= link_to('This is a link to gmail', 'http://www.gmail.com') %>
815

916
</p>
1017
<hr />
@@ -15,6 +22,8 @@
1522
<div>
1623
<h3> I'm a footer</h3>
1724
<p>Put things in the footer</p>
25+
<a href="http://google.com">Assignment task #3 told me to add this link to google.</a>
26+
<%= link_to('This is a link to google', 'http://google.com') %>
1827
</div>
1928
</body>
2029
</html>

0 commit comments

Comments
 (0)