Guest User

Untitled

a guest
Jun 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. ## Where should this go? Trying to format output from changes (ActiveRecord::Dirty)
  2.  
  3. def table_form(changes)
  4. table = ''
  5. changes.each do |f|
  6. table << "<tr>
  7. <td>#{f[0]}</td>
  8. <td>#{f[1][0]}</td>
  9. <td>#{f[1]][1]}</td>
  10. </tr>
  11. "
  12. end
  13. return table
  14. end
Add Comment
Please, Sign In to add comment