refactor table.rb - step 7