Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Stuff

  • Loading branch information...
commit 88ed03c83e5ac6142601953868f0ecfd42e4da50 1 parent 2a0b8fa
Jonathan Hoyt authored
Showing with 36 additions and 2 deletions.
  1. +7 −2 openhouse.rb
  2. +29 −0 views/all.haml
View
9 openhouse.rb
@@ -27,12 +27,17 @@
haml :random
end
+get "/all" do
+ @people = Person.all
+ haml :all
+end
+
### HELPERS ###
def random_person
count = Person.all.length
number = rand(count) + 1
- @person = Person[number]
- return @person
+ person = Person[number]
+ return person
end
View
29 views/all.haml
@@ -0,0 +1,29 @@
+!!! XML
+!!! Strict
+%html
+ %head
+ %title SabreTech Consulting LLC, OpenHouse 2008
+ %meta{'http-equiv' => 'content-type', :content => 'text/html; charset=utf-8'}
+ %link{:charset => 'utf-8', :href => '/stylesheet.css', :media => 'screen', :rel => 'stylesheet', :type => 'text/css'}
+ %body
+ %div#container
+ %div#title
+ %a{:href => "http://openhouse.sabretechllc.com"}
+ %img{:src => "http://www.sabretechllc.com/images/header_img.jpg", :width => "680px"}
+ %div#nav
+ %ul
+ %li
+ %a{:href => "http://www.sabretechllc.com/sales", :class => "first divider"} Products
+ %li
+ %a{:href => "http://www.sabretechllc.com/services", :class => "divider"} Services
+ %li
+ %a{:href => "http://www.sabretechllc.com/about", :class => "divider"} About Us
+ %li
+ %a{:href => "http://www.sabretechllc.com/blog", :class => ""} SabreBlog
+ %div#page_description
+ %ul
+ - @people.each do |person|
+ %li
+ %a{:href => "/person/#{person.id}"}= "#{person.firstname} #{person.lastname}"
+ %div#footer
+ %p Designed by JonMagic
Please sign in to comment.
Something went wrong with that request. Please try again.