layout to haml and creation of pagescontroller