I defined function in application helper:
def display_standard_table(columns, collection = {}) content_tag :table do concat content_tag :thea
Adding '.join().html_safe' to the end of each collect section. That's what worked for me.
collection.collect { |elem| concat content_tag(:tr, columns.collect { |column| content_tag(:td, elem.attributes[column[:name]]) }) }.join().html_safe