What code do I need to add to make this **#1 table**: ![enter image description here][1] - Click at Bottom look like this **#2 table**: ![enter image description here][2] - Click at Bottom Every time the user inputs a new _form containing name | metric | result | date there should be a new row added for the date and a new column added for the name & metric. If you decide to take up this crusade, thank you! You shall be blessed with **70** virgins. **index** <!-- begin snippet: js hide: false --> <!-- language: lang-html --> <!-- Default bootstrap panel contents --> <div id="values" class="panel panel-default"> <div class="panel-heading"><h4><b>AVERAGE</b></h4></div> <!-- Table --> <table> <thead> <% @averaged_quantifieds.each do |averaged| %> <% if averaged.user == current_user %> <tr> <th class="value"> <%= averaged.name %> (<%= averaged.metric %>) </th> </tr> </thead> <tbody> <tr> <th class="category"> <%= averaged.date.strftime("%m-%d-%Y") %> </th> <th class="value"> <%= averaged.result %> </th> </tr> <% end %> <% end %> </table> </div> <!-- end snippet --> **controller index** <!-- begin snippet: js hide: false --> <!-- language: lang-html --> def index @averaged_quantifieds = current_user.quantifieds.averaged end <!-- end snippet --> **rb** <!-- begin snippet: js hide: false --> <!-- language: lang-html --> class Quantified < ActiveRecord::Base belongs_to :user scope :averaged, -> { where(categories: 'Monthly Average') } CATEGORIES = ['Monthly Average', 'One-Time Instance'] end <!-- end snippet --> **schema** <!-- begin snippet: js hide: false --> <!-- language: lang-html --> create_table "quantifieds", force: true do |t| t.string "categories" t.string "name" t.string "metric" t.decimal "result" t.date "date" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "user_id" end add_index "quantifieds", ["categories"], name: "index_quantifieds_on_categories" add_index "quantifieds", ["user_id"], name: "index_quantifieds_on_user_id" <!-- end snippet --> [1]: http://i.stack.imgur.com/vgUym.png [2]: http://i.stack.imgur.com/5fDG9.png
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)