Converting static to rails app