14. require 'rubygems'
require 'sinatra'
require 'lib/posts'
post '/posts'
post = Post.create! params
redirect quot;/posts/#{post.id}quot;
do
get '/posts/:id' do
@post = Post.find(params[:id])
erb :post
end
21. get '/:page' do
@page = Page.find(params[:page])
haml :show
end
__END__
@@ layout
%html
%body
%content=yield
@@ show
%h1= title
#page_content= @page.to_html