Skip to content

Instantly share code, notes, and snippets.

@valachi
Created May 8, 2013 08:52
Show Gist options
  • Save valachi/5539158 to your computer and use it in GitHub Desktop.
Save valachi/5539158 to your computer and use it in GitHub Desktop.
=javascript_tag do
var columns = [];
- current_object.rounds.each do |round|
==columns.push(new SpreadSheetColumn("#{round.name}",#{round.id}));
var rows = [];
- current_object.share_holders.each do |holder|
==rows.push(new SpreadSheetRow("#{holder.name}",#{holder.id},#{current_object.rounds.map{|t| holder.ownerships.of(t).amount}.inspect}));
window.dataTable = new SpreadSheetTable(columns,rows);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment