refactor show.html.erb by moving code to helper