use rails link_to method, improve logic on current_page method