change static pages to dynamic pages with erb