Sha256: 3c69d4bdd51c2f99eaa1cb913f66fa22cb6643efd48eaeb50414e827b9b51bef
Contents?: true
Size: 633 Bytes
Versions: 4
Compression:
Stored size: 633 Bytes
Contents
<% headers = current_model_decorator.index_field_names.map do |field_name| current_model_decorator.index_label_of(field_name) end decorated_collection = decorate collection %> <%= ::CSV.generate_line(headers).strip.html_safe %> <% decorated_collection.each do |decorated| data = current_model_decorator.index_field_names.map do |field_name| render( decorated.index_type_of(field_name), object: decorated, field_name: field_name, value: decorated.try(field_name), metadata: decorated.index_metadata_of(field_name) ) end %> <%= ::CSV.generate_line(data).strip.html_safe %> <% end %>
Version data entries
4 entries across 4 versions & 1 rubygems