From 090634db409161a4085b0adb9cd57ddc4cfaeb67 Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Tue, 17 Nov 2015 16:36:53 -0800
Subject: [PATCH 01/86] Added relationship between models and required fields
---
app/models/market.rb | 2 ++
app/models/vendor.rb | 3 +++
.../20151118003220_add_index_to_vendor.rb | 6 ++++++
db/schema.rb | 19 ++++++++++---------
4 files changed, 21 insertions(+), 9 deletions(-)
create mode 100644 db/migrate/20151118003220_add_index_to_vendor.rb
diff --git a/app/models/market.rb b/app/models/market.rb
index 1a4a52dd..23db67a8 100644
--- a/app/models/market.rb
+++ b/app/models/market.rb
@@ -1,2 +1,4 @@
class Market < ActiveRecord::Base
+ has_many :vendors
+ validates :name, presence: true
end
diff --git a/app/models/vendor.rb b/app/models/vendor.rb
index dac23f0a..2cb8a490 100644
--- a/app/models/vendor.rb
+++ b/app/models/vendor.rb
@@ -1,2 +1,5 @@
class Vendor < ActiveRecord::Base
+ belongs_to :market
+ validates :name, presence: true
+ validates :market_id, presence: true
end
diff --git a/db/migrate/20151118003220_add_index_to_vendor.rb b/db/migrate/20151118003220_add_index_to_vendor.rb
new file mode 100644
index 00000000..4583aba6
--- /dev/null
+++ b/db/migrate/20151118003220_add_index_to_vendor.rb
@@ -0,0 +1,6 @@
+class AddIndexToVendor < ActiveRecord::Migration
+ def change
+
+ add_index :vendors, :market_id
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index e7fc356f..2c240f11 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,15 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20151118002103) do
-
- create_table "vendors", force: :cascade do |t|
- t.string "name"
- t.integer "no_employees"
- t.integer "market_id"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- end
+ActiveRecord::Schema.define(version: 20151118003220) do
create_table "markets", force: :cascade do |t|
t.string "name"
@@ -30,7 +22,16 @@
t.string "zip"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ end
+ create_table "vendors", force: :cascade do |t|
+ t.string "name"
+ t.integer "no_employees"
+ t.integer "market_id"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
end
+ add_index "vendors", ["market_id"], name: "index_vendors_on_market_id"
+
end
From 15635301194534eabc7a5b0d540f7f3b3aa0f20b Mon Sep 17 00:00:00 2001
From: Jennie Buechner
Date: Tue, 17 Nov 2015 16:46:49 -0800
Subject: [PATCH 02/86] add market to seed.rb
---
db/seeds.rb | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/db/seeds.rb b/db/seeds.rb
index 4edb1e85..57014159 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -5,3 +5,25 @@
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
+require 'csv'
+
+def create_market_hash(market_array)
+ market_hash = {}
+ market_hash[:id] = market_array[0].to_i
+ market_hash[:name] = market_array[1]
+ market_hash[:address] = market_array[2]
+ market_hash[:city] = market_array[3]
+ market_hash[:county] = market_array[4]
+ market_hash[:state] = market_array[5]
+ market_hash[:zip] = market_array[6]
+ return market_hash
+end
+
+csv_file = CSV.read('./seed_csvs/markets.csv')
+# Create empty array which will hold all the objects
+csv_file.each do |row|
+ # Convert the array to a hash
+ csv_hash = create_market_hash(row)
+ # Create an object from each row-hash in the csv file
+ Market.create(csv_hash)
+end
From 5be829eb0aaa58cb90e4f4721694439951bddac8 Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Tue, 17 Nov 2015 16:52:38 -0800
Subject: [PATCH 03/86] Seeded vendors table
---
db/seeds.rb | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/db/seeds.rb b/db/seeds.rb
index 57014159..0f3b5ae4 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -27,3 +27,21 @@ def create_market_hash(market_array)
# Create an object from each row-hash in the csv file
Market.create(csv_hash)
end
+
+def create_vendor_hash(array)
+ vendor = {}
+ vendor[:id] = array[0].to_i
+ vendor[:name] = array[1]
+ vendor[:no_employees] = array[2].to_i
+ vendor[:market_id] = array[3].to_i
+ return vendor
+end
+
+csv_file = CSV.read('./seed_csvs/vendors.csv')
+# Create empty array which will hold all the objects
+csv_file.each do |row|
+ # Convert the array to a hash
+ csv_hash = create_vendor_hash(row)
+ # Create an object from each row-hash in the csv file
+ Vendor.create(csv_hash)
+end
From e87afb808ee50ca14bce9c4283ee11f9d95d6714 Mon Sep 17 00:00:00 2001
From: Jennie Buechner
Date: Tue, 17 Nov 2015 16:55:01 -0800
Subject: [PATCH 04/86] create product model and controller
---
app/assets/javascripts/products.coffee | 3 +++
app/assets/stylesheets/products.scss | 3 +++
app/controllers/products_controller.rb | 2 ++
app/helpers/products_helper.rb | 2 ++
app/models/product.rb | 4 ++++
db/migrate/20151118005047_create_products.rb | 10 ++++++++++
db/migrate/20151118005341_add_index_to_product.rb | 5 +++++
db/schema.rb | 11 ++++++++++-
8 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 app/assets/javascripts/products.coffee
create mode 100644 app/assets/stylesheets/products.scss
create mode 100644 app/controllers/products_controller.rb
create mode 100644 app/helpers/products_helper.rb
create mode 100644 app/models/product.rb
create mode 100644 db/migrate/20151118005047_create_products.rb
create mode 100644 db/migrate/20151118005341_add_index_to_product.rb
diff --git a/app/assets/javascripts/products.coffee b/app/assets/javascripts/products.coffee
new file mode 100644
index 00000000..24f83d18
--- /dev/null
+++ b/app/assets/javascripts/products.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/stylesheets/products.scss b/app/assets/stylesheets/products.scss
new file mode 100644
index 00000000..89e2e8db
--- /dev/null
+++ b/app/assets/stylesheets/products.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the products controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb
new file mode 100644
index 00000000..f1ad12dd
--- /dev/null
+++ b/app/controllers/products_controller.rb
@@ -0,0 +1,2 @@
+class ProductsController < ApplicationController
+end
diff --git a/app/helpers/products_helper.rb b/app/helpers/products_helper.rb
new file mode 100644
index 00000000..ab5c42b3
--- /dev/null
+++ b/app/helpers/products_helper.rb
@@ -0,0 +1,2 @@
+module ProductsHelper
+end
diff --git a/app/models/product.rb b/app/models/product.rb
new file mode 100644
index 00000000..d0383b3d
--- /dev/null
+++ b/app/models/product.rb
@@ -0,0 +1,4 @@
+class Product < ActiveRecord::Base
+ validates :name, presence: true
+ validates :vendor_id, presence: true
+end
diff --git a/db/migrate/20151118005047_create_products.rb b/db/migrate/20151118005047_create_products.rb
new file mode 100644
index 00000000..b683e018
--- /dev/null
+++ b/db/migrate/20151118005047_create_products.rb
@@ -0,0 +1,10 @@
+class CreateProducts < ActiveRecord::Migration
+ def change
+ create_table :products do |t|
+ t.string :name
+ t.integer :vendor_id
+
+ t.timestamps null: false
+ end
+ end
+end
diff --git a/db/migrate/20151118005341_add_index_to_product.rb b/db/migrate/20151118005341_add_index_to_product.rb
new file mode 100644
index 00000000..ec81a28a
--- /dev/null
+++ b/db/migrate/20151118005341_add_index_to_product.rb
@@ -0,0 +1,5 @@
+class AddIndexToProduct < ActiveRecord::Migration
+ def change
+ add_index :products, :vendor_id
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2c240f11..5c96ece0 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20151118003220) do
+ActiveRecord::Schema.define(version: 20151118005341) do
create_table "markets", force: :cascade do |t|
t.string "name"
@@ -24,6 +24,15 @@
t.datetime "updated_at", null: false
end
+ create_table "products", force: :cascade do |t|
+ t.string "name"
+ t.integer "vendor_id"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ end
+
+ add_index "products", ["vendor_id"], name: "index_products_on_vendor_id"
+
create_table "vendors", force: :cascade do |t|
t.string "name"
t.integer "no_employees"
From 30a4e47c35909691f6eb2d1bb1697a38f958fbf5 Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Tue, 17 Nov 2015 16:56:15 -0800
Subject: [PATCH 05/86] Create Sale model and controller, added relationships
to Sale model
---
app/assets/javascripts/sales.coffee | 3 +++
app/assets/stylesheets/sales.scss | 3 +++
app/controllers/sales_controller.rb | 2 ++
app/helpers/sales_helper.rb | 2 ++
app/models/sale.rb | 6 ++++++
db/migrate/20151118005422_create_sales.rb | 12 ++++++++++++
6 files changed, 28 insertions(+)
create mode 100644 app/assets/javascripts/sales.coffee
create mode 100644 app/assets/stylesheets/sales.scss
create mode 100644 app/controllers/sales_controller.rb
create mode 100644 app/helpers/sales_helper.rb
create mode 100644 app/models/sale.rb
create mode 100644 db/migrate/20151118005422_create_sales.rb
diff --git a/app/assets/javascripts/sales.coffee b/app/assets/javascripts/sales.coffee
new file mode 100644
index 00000000..24f83d18
--- /dev/null
+++ b/app/assets/javascripts/sales.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/stylesheets/sales.scss b/app/assets/stylesheets/sales.scss
new file mode 100644
index 00000000..6f3405b9
--- /dev/null
+++ b/app/assets/stylesheets/sales.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the sales controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/controllers/sales_controller.rb b/app/controllers/sales_controller.rb
new file mode 100644
index 00000000..1b778cf3
--- /dev/null
+++ b/app/controllers/sales_controller.rb
@@ -0,0 +1,2 @@
+class SalesController < ApplicationController
+end
diff --git a/app/helpers/sales_helper.rb b/app/helpers/sales_helper.rb
new file mode 100644
index 00000000..8611c4a0
--- /dev/null
+++ b/app/helpers/sales_helper.rb
@@ -0,0 +1,2 @@
+module SalesHelper
+end
diff --git a/app/models/sale.rb b/app/models/sale.rb
new file mode 100644
index 00000000..68f55827
--- /dev/null
+++ b/app/models/sale.rb
@@ -0,0 +1,6 @@
+class Sale < ActiveRecord::Base
+ belongs_to :vendor
+ belongs_to :product
+ validates :vendor_id, presence: true
+ validates :product_id, presence: true
+end
diff --git a/db/migrate/20151118005422_create_sales.rb b/db/migrate/20151118005422_create_sales.rb
new file mode 100644
index 00000000..6d4e2ea9
--- /dev/null
+++ b/db/migrate/20151118005422_create_sales.rb
@@ -0,0 +1,12 @@
+class CreateSales < ActiveRecord::Migration
+ def change
+ create_table :sales do |t|
+ t.integer :amount
+ t.datetime :purchase_time
+ t.integer :vendor_id
+ t.integer :product_id
+
+ t.timestamps null: false
+ end
+ end
+end
From 7f95f5c9e78fa6b798bbb09ebd57d736b232d9e5 Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Tue, 17 Nov 2015 16:58:42 -0800
Subject: [PATCH 06/86] Added relationships to Product model
---
app/models/product.rb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/models/product.rb b/app/models/product.rb
index d0383b3d..2997fe7f 100644
--- a/app/models/product.rb
+++ b/app/models/product.rb
@@ -1,4 +1,6 @@
class Product < ActiveRecord::Base
+ belongs_to :vendor
+ has_many :sales
validates :name, presence: true
validates :vendor_id, presence: true
end
From 4c7656090f212f686d9a8387c764b3a932b5e438 Mon Sep 17 00:00:00 2001
From: Jennie Buechner
Date: Wed, 18 Nov 2015 08:48:57 -0800
Subject: [PATCH 07/86] add has_many products to vendor
---
app/models/vendor.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/models/vendor.rb b/app/models/vendor.rb
index 2cb8a490..a62ae751 100644
--- a/app/models/vendor.rb
+++ b/app/models/vendor.rb
@@ -1,5 +1,6 @@
class Vendor < ActiveRecord::Base
belongs_to :market
+ has_many :products
validates :name, presence: true
validates :market_id, presence: true
end
From fdbca95e303d09e95fe8e139499954efa33ae828 Mon Sep 17 00:00:00 2001
From: Jennie Buechner
Date: Wed, 18 Nov 2015 08:49:23 -0800
Subject: [PATCH 08/86] create seed for vendor
---
db/schema.rb | 11 ++++++++++-
db/seeds.rb | 17 +++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/db/schema.rb b/db/schema.rb
index 5c96ece0..0f624e27 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20151118005341) do
+ActiveRecord::Schema.define(version: 20151118005422) do
create_table "markets", force: :cascade do |t|
t.string "name"
@@ -33,6 +33,15 @@
add_index "products", ["vendor_id"], name: "index_products_on_vendor_id"
+ create_table "sales", force: :cascade do |t|
+ t.integer "amount"
+ t.datetime "purchase_time"
+ t.integer "vendor_id"
+ t.integer "product_id"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ end
+
create_table "vendors", force: :cascade do |t|
t.string "name"
t.integer "no_employees"
diff --git a/db/seeds.rb b/db/seeds.rb
index 0f3b5ae4..44ef6a4a 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -45,3 +45,20 @@ def create_vendor_hash(array)
# Create an object from each row-hash in the csv file
Vendor.create(csv_hash)
end
+
+def create_product_hash(product_array)
+ product_hash = {}
+ product_hash[:id] = product_array[0].to_i
+ product_hash[:name] = product_array[1]
+ product_hash[:vendor_id] = product_array[2].to_i
+ return product_hash
+end
+
+csv_file = CSV.read('./seed_csvs/products.csv')
+# Create empty array which will hold all the objects
+csv_file.each do |row|
+ # Convert the array to a hash
+ csv_hash = create_product_hash(row)
+ # Create an object from each row-hash in the csv file
+ Product.create(csv_hash)
+end
From 15a9b8ed0e29ffed5926e9a2b0be1f469a599e62 Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Wed, 18 Nov 2015 09:40:46 -0800
Subject: [PATCH 09/86] Seeded Sale and added has_many sales to Vendor
---
app/models/vendor.rb | 1 +
.../20151118173740_add_indices_to_sale.rb | 6 ++++++
db/schema.rb | 5 ++++-
db/seeds.rb | 19 +++++++++++++++++++
4 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 db/migrate/20151118173740_add_indices_to_sale.rb
diff --git a/app/models/vendor.rb b/app/models/vendor.rb
index a62ae751..4208990c 100644
--- a/app/models/vendor.rb
+++ b/app/models/vendor.rb
@@ -1,6 +1,7 @@
class Vendor < ActiveRecord::Base
belongs_to :market
has_many :products
+ has_many :sales
validates :name, presence: true
validates :market_id, presence: true
end
diff --git a/db/migrate/20151118173740_add_indices_to_sale.rb b/db/migrate/20151118173740_add_indices_to_sale.rb
new file mode 100644
index 00000000..7105942a
--- /dev/null
+++ b/db/migrate/20151118173740_add_indices_to_sale.rb
@@ -0,0 +1,6 @@
+class AddIndicesToSale < ActiveRecord::Migration
+ def change
+ add_index :sales, :vendor_id
+ add_index :sales, :product_id
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 0f624e27..b7c9ab29 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20151118005422) do
+ActiveRecord::Schema.define(version: 20151118173740) do
create_table "markets", force: :cascade do |t|
t.string "name"
@@ -42,6 +42,9 @@
t.datetime "updated_at", null: false
end
+ add_index "sales", ["product_id"], name: "index_sales_on_product_id"
+ add_index "sales", ["vendor_id"], name: "index_sales_on_vendor_id"
+
create_table "vendors", force: :cascade do |t|
t.string "name"
t.integer "no_employees"
diff --git a/db/seeds.rb b/db/seeds.rb
index 44ef6a4a..c346ccc9 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -62,3 +62,22 @@ def create_product_hash(product_array)
# Create an object from each row-hash in the csv file
Product.create(csv_hash)
end
+
+def create_sale_hash(sale_array)
+ sale_hash = {}
+ sale_hash[:id] = sale_array[0].to_i
+ sale_hash[:amount] = sale_array[1].to_i
+ sale_hash[:purchase_time] = DateTime.parse(sale_array[2])
+ sale_hash[:vendor_id] = sale_array[3].to_i
+ sale_hash[:product_id] = sale_array[4].to_i
+ return sale_hash
+end
+
+csv_file = CSV.read('./seed_csvs/sales.csv')
+# Create empty array which will hold all the objects
+csv_file.each do |row|
+ # Convert the array to a hash
+ csv_hash = create_sale_hash(row)
+ # Create an object from each row-hash in the csv file
+ Sale.create(csv_hash)
+end
From 5d53381c015032a114075af6ee97483d2e0a8e42 Mon Sep 17 00:00:00 2001
From: Jennie Buechner
Date: Wed, 18 Nov 2015 10:07:05 -0800
Subject: [PATCH 10/86] create routes and method stubs for all controllers
---
app/controllers/markets_controller.rb | 22 ++++++++++++++++++++++
app/controllers/products_controller.rb | 21 +++++++++++++++++++++
app/controllers/sales_controller.rb | 13 +++++++++++++
app/controllers/vendors_controller.rb | 21 +++++++++++++++++++++
config/routes.rb | 15 +++++++++++++++
5 files changed, 92 insertions(+)
diff --git a/app/controllers/markets_controller.rb b/app/controllers/markets_controller.rb
index fa158671..6fbccdf4 100644
--- a/app/controllers/markets_controller.rb
+++ b/app/controllers/markets_controller.rb
@@ -1,2 +1,24 @@
class MarketsController < ApplicationController
+
+ def index
+ end
+
+ def create
+ end
+
+ def new
+ end
+
+ def edit
+ end
+
+ def show
+ end
+
+ def update
+ end
+
+ def destroy
+ end
+
end
diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb
index f1ad12dd..a7668515 100644
--- a/app/controllers/products_controller.rb
+++ b/app/controllers/products_controller.rb
@@ -1,2 +1,23 @@
class ProductsController < ApplicationController
+ def index
+ end
+
+ def create
+ end
+
+ def new
+ end
+
+ def edit
+ end
+
+ def show
+ end
+
+ def update
+ end
+
+ def destroy
+ end
+
end
diff --git a/app/controllers/sales_controller.rb b/app/controllers/sales_controller.rb
index 1b778cf3..ee4f13ac 100644
--- a/app/controllers/sales_controller.rb
+++ b/app/controllers/sales_controller.rb
@@ -1,2 +1,15 @@
class SalesController < ApplicationController
+
+ def index
+ end
+
+ def new
+ end
+
+ def create
+ end
+
+ def month
+ end
+
end
diff --git a/app/controllers/vendors_controller.rb b/app/controllers/vendors_controller.rb
index f14c7ec9..b37fc721 100644
--- a/app/controllers/vendors_controller.rb
+++ b/app/controllers/vendors_controller.rb
@@ -1,2 +1,23 @@
class VendorsController < ApplicationController
+ def index
+ end
+
+ def create
+ end
+
+ def new
+ end
+
+ def edit
+ end
+
+ def show
+ end
+
+ def update
+ end
+
+ def destroy
+ end
+
end
diff --git a/config/routes.rb b/config/routes.rb
index 3f66539d..20728c6a 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,19 @@
Rails.application.routes.draw do
+ resources :markets do
+ resources :vendors
+ end
+ resources :vendors do
+ member do
+ get 'sales/' => 'sales#index'
+ get 'sales/month' => 'sales#month'
+ end
+ resources :products do
+ member do
+ get 'sales/new'
+ post 'sales/create'
+ end
+ end
+ end
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
From f8f679a95cc632a147c09c7b628d5ea5f1dde73e Mon Sep 17 00:00:00 2001
From: Jennie Buechner
Date: Wed, 18 Nov 2015 10:18:40 -0800
Subject: [PATCH 11/86] add static page homepage
---
app/assets/javascripts/static_pages.coffee | 3 +++
app/assets/stylesheets/static_pages.scss | 3 +++
app/controllers/static_pages_controller.rb | 4 ++++
app/helpers/static_pages_helper.rb | 2 ++
app/views/static_pages/index.html.erb | 1 +
config/routes.rb | 1 +
6 files changed, 14 insertions(+)
create mode 100644 app/assets/javascripts/static_pages.coffee
create mode 100644 app/assets/stylesheets/static_pages.scss
create mode 100644 app/controllers/static_pages_controller.rb
create mode 100644 app/helpers/static_pages_helper.rb
create mode 100644 app/views/static_pages/index.html.erb
diff --git a/app/assets/javascripts/static_pages.coffee b/app/assets/javascripts/static_pages.coffee
new file mode 100644
index 00000000..24f83d18
--- /dev/null
+++ b/app/assets/javascripts/static_pages.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/stylesheets/static_pages.scss b/app/assets/stylesheets/static_pages.scss
new file mode 100644
index 00000000..40608b2f
--- /dev/null
+++ b/app/assets/stylesheets/static_pages.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the static_pages controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb
new file mode 100644
index 00000000..91da0c26
--- /dev/null
+++ b/app/controllers/static_pages_controller.rb
@@ -0,0 +1,4 @@
+class StaticPagesController < ApplicationController
+ def index
+ end
+end
diff --git a/app/helpers/static_pages_helper.rb b/app/helpers/static_pages_helper.rb
new file mode 100644
index 00000000..2d63e79e
--- /dev/null
+++ b/app/helpers/static_pages_helper.rb
@@ -0,0 +1,2 @@
+module StaticPagesHelper
+end
diff --git a/app/views/static_pages/index.html.erb b/app/views/static_pages/index.html.erb
new file mode 100644
index 00000000..af5626b4
--- /dev/null
+++ b/app/views/static_pages/index.html.erb
@@ -0,0 +1 @@
+Hello, world!
diff --git a/config/routes.rb b/config/routes.rb
index 20728c6a..95fd99a8 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,5 @@
Rails.application.routes.draw do
+ root 'static_pages#index'
resources :markets do
resources :vendors
end
From f2d54a0d609f4f8f8e3e3fce0130cd7f847fb860 Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Wed, 18 Nov 2015 10:30:27 -0800
Subject: [PATCH 12/86] Created CRUD controller methods for Markets
---
app/controllers/markets_controller.rb | 32 +++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
diff --git a/app/controllers/markets_controller.rb b/app/controllers/markets_controller.rb
index 6fbccdf4..7ac6d5cc 100644
--- a/app/controllers/markets_controller.rb
+++ b/app/controllers/markets_controller.rb
@@ -1,24 +1,52 @@
class MarketsController < ApplicationController
def index
+ @markets = Market.all
end
- def create
+ def new
+ @market = Market.new
end
- def new
+ def create
+ Market.create(market_params[:market])
+ redirect_to "/markets"
end
def edit
+ id = params[:id]
+ @market = Market.find(id)
end
def show
+ id = params[:id]
+ @market = Market.find(id)
end
def update
+ id = params[:id]
+ @market = Market.find(id)
+ @market.update(
+ name: market_params[:market][:name],
+ address: market_params[:market][:address],
+ city: market_params[:market][:city],
+ county: market_params[:market][:county],
+ state: market_params[:market][:state],
+ zip: market_params[:market][:zip]
+ )
+ redirect_to "/markets"
end
def destroy
+ id = params[:id]
+ Market.destroy(id)
+ redirect_to "/markets"
+ end
+
+ private
+
+ def market_params
+ params.permit(market:[:id, :name, :address, :city, :county, :state, :zip])
end
end
From 99ba33fdc736cc2ebe2402c9a14626cdf4622ce2 Mon Sep 17 00:00:00 2001
From: Jennie Buechner
Date: Wed, 18 Nov 2015 10:32:44 -0800
Subject: [PATCH 13/86] integrate bootstrap
---
Gemfile | 3 +++
Gemfile.lock | 7 +++++++
app/assets/javascripts/application.js | 1 +
.../stylesheets/{application.css => application.scss} | 6 ++++--
4 files changed, 15 insertions(+), 2 deletions(-)
rename app/assets/stylesheets/{application.css => application.scss} (81%)
diff --git a/Gemfile b/Gemfile
index fdc8529d..e98bb61d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -22,6 +22,9 @@ gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
+# Include Bootstrap
+gem 'bootstrap-sass', '~> 3.3.5'
+
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
diff --git a/Gemfile.lock b/Gemfile.lock
index eb9e0d41..a33c92ca 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -37,12 +37,18 @@ GEM
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.3)
+ autoprefixer-rails (6.1.0.1)
+ execjs
+ json
better_errors (2.1.1)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
rack (>= 0.9.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
+ bootstrap-sass (3.3.5.1)
+ autoprefixer-rails (>= 5.0.0.1)
+ sass (>= 3.3.0)
builder (3.2.2)
byebug (8.2.0)
coderay (1.1.0)
@@ -147,6 +153,7 @@ PLATFORMS
DEPENDENCIES
better_errors
binding_of_caller
+ bootstrap-sass (~> 3.3.5)
byebug
coffee-rails (~> 4.1.0)
jbuilder (~> 2.0)
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index e07c5a83..f91cae5d 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -11,6 +11,7 @@
// about supported directives.
//
//= require jquery
+//= require bootstrap-sprockets
//= require jquery_ujs
//= require turbolinks
//= require_tree .
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.scss
similarity index 81%
rename from app/assets/stylesheets/application.css
rename to app/assets/stylesheets/application.scss
index f9cd5b34..5be01512 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.scss
@@ -10,6 +10,8 @@
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
- *= require_tree .
- *= require_self
*/
+
+ // "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
+ @import "bootstrap-sprockets";
+ @import "bootstrap";
From 144fc89b9bf06ca93f18734439457d5b090c3fb6 Mon Sep 17 00:00:00 2001
From: Jennie Buechner
Date: Wed, 18 Nov 2015 10:33:35 -0800
Subject: [PATCH 14/86] create blank index.html pages for markets and products
---
app/views/markets/index.html.erb | 0
app/views/products/index.html.erb | 0
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 app/views/markets/index.html.erb
create mode 100644 app/views/products/index.html.erb
diff --git a/app/views/markets/index.html.erb b/app/views/markets/index.html.erb
new file mode 100644
index 00000000..e69de29b
diff --git a/app/views/products/index.html.erb b/app/views/products/index.html.erb
new file mode 100644
index 00000000..e69de29b
From a734d263ffd208ebbb155154353d9c462a187e02 Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Wed, 18 Nov 2015 10:33:46 -0800
Subject: [PATCH 15/86] Created index erbs for vendor and sale
---
app/views/sales/index.html.erb | 0
app/views/vendors/index.html.erb | 0
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 app/views/sales/index.html.erb
create mode 100644 app/views/vendors/index.html.erb
diff --git a/app/views/sales/index.html.erb b/app/views/sales/index.html.erb
new file mode 100644
index 00000000..e69de29b
diff --git a/app/views/vendors/index.html.erb b/app/views/vendors/index.html.erb
new file mode 100644
index 00000000..e69de29b
From b8d8e4d31030e30561ae73f1b2d1a1f873d9e403 Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Wed, 18 Nov 2015 10:44:46 -0800
Subject: [PATCH 16/86] Added basic skeleton for market pages
---
app/views/markets/_form.html.erb | 18 ++++++++++++++++++
app/views/markets/edit.html.erb | 1 +
app/views/markets/index.html.erb | 6 ++++++
app/views/markets/new.html.erb | 1 +
app/views/markets/show.html.erb | 3 +++
5 files changed, 29 insertions(+)
create mode 100644 app/views/markets/_form.html.erb
create mode 100644 app/views/markets/edit.html.erb
create mode 100644 app/views/markets/new.html.erb
create mode 100644 app/views/markets/show.html.erb
diff --git a/app/views/markets/_form.html.erb b/app/views/markets/_form.html.erb
new file mode 100644
index 00000000..e38b186f
--- /dev/null
+++ b/app/views/markets/_form.html.erb
@@ -0,0 +1,18 @@
+<%= form_for @market, :html => {:class => "form-inline"} do |f| %>
+
+ <%= legend_text %>
+ <%= f.label :name %>
+ <%= f.text_field :name %>
+ <%= f.label :address %>
+ <%= f.text_field :address %>
+ <%= f.label :city %>
+ <%= f.text_field :city %>
+ <%= f.label :county %>
+ <%= f.text_field :county %>
+ <%= f.label :state %>
+ <%= f.text_field :state %>
+ <%= f.label :zip %>
+ <%= f.text_field :zip %>
+ <%= f.submit value: "#{button_text}", class: "new_button"%>
+
+<% end %>
diff --git a/app/views/markets/edit.html.erb b/app/views/markets/edit.html.erb
new file mode 100644
index 00000000..82841ff5
--- /dev/null
+++ b/app/views/markets/edit.html.erb
@@ -0,0 +1 @@
+<%= render partial: 'form', locals: {method_type: :patch, button_text: "Edit Market", legend_text: "Update Market"} %>
diff --git a/app/views/markets/index.html.erb b/app/views/markets/index.html.erb
index e69de29b..17c7c49b 100644
--- a/app/views/markets/index.html.erb
+++ b/app/views/markets/index.html.erb
@@ -0,0 +1,6 @@
+
+ <% @markets.each do |market| %>
+ <%= market.name %>
+
+ <% end %>
+
diff --git a/app/views/markets/new.html.erb b/app/views/markets/new.html.erb
new file mode 100644
index 00000000..cd35a778
--- /dev/null
+++ b/app/views/markets/new.html.erb
@@ -0,0 +1 @@
+<%= render partial: 'form', locals: {button_text: "Create Market", legend_text: "Add Market"} %>
diff --git a/app/views/markets/show.html.erb b/app/views/markets/show.html.erb
new file mode 100644
index 00000000..02f0007f
--- /dev/null
+++ b/app/views/markets/show.html.erb
@@ -0,0 +1,3 @@
+
+ <%= @market.name %>
+
From 6412d5950c66ecec2af4026e1fdd95805712d22a Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Wed, 18 Nov 2015 10:53:14 -0800
Subject: [PATCH 17/86] Verified all market controller actions
---
app/controllers/markets_controller.rb | 1 +
app/views/markets/index.html.erb | 2 +-
app/views/markets/show.html.erb | 8 +++++++-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/app/controllers/markets_controller.rb b/app/controllers/markets_controller.rb
index 7ac6d5cc..93a22689 100644
--- a/app/controllers/markets_controller.rb
+++ b/app/controllers/markets_controller.rb
@@ -21,6 +21,7 @@ def edit
def show
id = params[:id]
@market = Market.find(id)
+ @vendors = Market.find(id).vendors
end
def update
diff --git a/app/views/markets/index.html.erb b/app/views/markets/index.html.erb
index 17c7c49b..6b8ff665 100644
--- a/app/views/markets/index.html.erb
+++ b/app/views/markets/index.html.erb
@@ -1,6 +1,6 @@
<% @markets.each do |market| %>
- <%= market.name %>
+ <%= market.name %> <%= button_to "Delete Me", "/markets/#{market.id}", method: :delete, data: { confirm: "Are you sure you want to delete this market?" } , class: 'x-button' %>
<% end %>
diff --git a/app/views/markets/show.html.erb b/app/views/markets/show.html.erb
index 02f0007f..b82de121 100644
--- a/app/views/markets/show.html.erb
+++ b/app/views/markets/show.html.erb
@@ -1,3 +1,9 @@
- <%= @market.name %>
+ I'm the market: <%= @market.name %>
+
+
+ Here's some info about me: <%= @market.address %>
+
+
+ Here are my vendors: <% @vendors.each do |vendor| %> <%= vendor.name %> <% end %>
From d21271c726adf9cc6f1529b5edd9241150f495f8 Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Wed, 18 Nov 2015 10:54:50 -0800
Subject: [PATCH 18/86] Added market details to show page
---
app/views/markets/show.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/markets/show.html.erb b/app/views/markets/show.html.erb
index b82de121..94d821de 100644
--- a/app/views/markets/show.html.erb
+++ b/app/views/markets/show.html.erb
@@ -2,7 +2,7 @@
I'm the market: <%= @market.name %>
- Here's some info about me: <%= @market.address %>
+ Here's some info about me: <%= @market.address %> <%= @market.city %> <%= @market.county %> <%= @market.state %> <%= @market.zip %>
Here are my vendors: <% @vendors.each do |vendor| %> <%= vendor.name %> <% end %>
From e86b6016db422627e9290b94101fa55632efa5bc Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Wed, 18 Nov 2015 11:05:41 -0800
Subject: [PATCH 19/86] Added vendor controller methods
---
app/controllers/vendors_controller.rb | 33 ++++++++++++++++++++++++---
1 file changed, 30 insertions(+), 3 deletions(-)
diff --git a/app/controllers/vendors_controller.rb b/app/controllers/vendors_controller.rb
index b37fc721..86819f58 100644
--- a/app/controllers/vendors_controller.rb
+++ b/app/controllers/vendors_controller.rb
@@ -1,23 +1,50 @@
class VendorsController < ApplicationController
def index
+ @vendors = Vendor.all
end
- def create
+ def new
+ @vendor = Vendor.new
end
- def new
+ def create
+ Vendor.create(vendor_params[:vendor])
+ redirect_to "/vendors"
end
def edit
+ id = params[:id]
+ @vendor = Vendor.find(id)
end
def show
+ id = params[:id]
+ @vendor = Vendor.find(id)
+ @products = Vendor.find(id).products
+ @sales = Vendor.find(id).sales
end
def update
+ id = params[:id]
+ @vendor = Vendor.find(id)
+ @vendor.update(
+ name: vendor_params[:vendor][:name],
+ no_employees: vendor_params[:vendor][:no_employees],
+ market_id: vendor_params[:vendor][:market_id]
+ )
+ redirect_to "/vendors"
end
def destroy
+ id = params[:id]
+ Vendor.destroy(id)
+ redirect_to "/vendors"
end
-
+
+ private
+
+ def vendor_params
+ params.permit(vendor:[:id, :name, :no_employees, :market_id])
+ end
+
end
From 17a6be6d13a51d5a4e9eaf338406b1d98baf7fc0 Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Wed, 18 Nov 2015 11:12:12 -0800
Subject: [PATCH 20/86] Added basic skeleton for vendor pages, verified vendor
controller methods
---
app/views/vendors/_form.html.erb | 12 ++++++++++++
app/views/vendors/edit.html.erb | 1 +
app/views/vendors/index.html.erb | 6 ++++++
app/views/vendors/new.html.erb | 1 +
app/views/vendors/show.html.erb | 9 +++++++++
5 files changed, 29 insertions(+)
create mode 100644 app/views/vendors/_form.html.erb
create mode 100644 app/views/vendors/edit.html.erb
create mode 100644 app/views/vendors/new.html.erb
create mode 100644 app/views/vendors/show.html.erb
diff --git a/app/views/vendors/_form.html.erb b/app/views/vendors/_form.html.erb
new file mode 100644
index 00000000..1c2337e7
--- /dev/null
+++ b/app/views/vendors/_form.html.erb
@@ -0,0 +1,12 @@
+<%= form_for @vendor, :html => {:class => "form-inline"} do |f| %>
+
+ <%= legend_text %>
+ <%= f.label :name %>
+ <%= f.text_field :name %>
+ <%= f.label :no_employees %>
+ <%= f.text_field :no_employees %>
+ <%= f.label :market_id %>
+ <%= f.text_field :market_id %>
+ <%= f.submit value: "#{button_text}", class: "new_button"%>
+
+<% end %>
diff --git a/app/views/vendors/edit.html.erb b/app/views/vendors/edit.html.erb
new file mode 100644
index 00000000..13dcc76f
--- /dev/null
+++ b/app/views/vendors/edit.html.erb
@@ -0,0 +1 @@
+<%= render partial: 'form', locals: {method_type: :patch, button_text: "Edit Vendor", legend_text: "Update Vendor"} %>
diff --git a/app/views/vendors/index.html.erb b/app/views/vendors/index.html.erb
index e69de29b..0c164520 100644
--- a/app/views/vendors/index.html.erb
+++ b/app/views/vendors/index.html.erb
@@ -0,0 +1,6 @@
+
+ <% @vendors.each do |vendor| %>
+ <%= vendor.name %> <%= button_to "Delete Me", "/vendors/#{vendor.id}", method: :delete, data: { confirm: "Are you sure you want to delete this vendor?" } , class: 'x-button' %>
+
+ <% end %>
+
diff --git a/app/views/vendors/new.html.erb b/app/views/vendors/new.html.erb
new file mode 100644
index 00000000..80018eda
--- /dev/null
+++ b/app/views/vendors/new.html.erb
@@ -0,0 +1 @@
+<%= render partial: 'form', locals: {button_text: "Create Vendor", legend_text: "Add Vendor"} %>
diff --git a/app/views/vendors/show.html.erb b/app/views/vendors/show.html.erb
new file mode 100644
index 00000000..7bdf5a74
--- /dev/null
+++ b/app/views/vendors/show.html.erb
@@ -0,0 +1,9 @@
+
+ I'm the vendor: <%= @vendor.name %>
+
+
+ Here's some info about me: <%= @vendor.no_employees %> <%= @vendor.market_id %>
+
+
+ Here are my products: <% @products.each do |product| %> <%= product.name %> <% end %>
+
From cc898cdb0ee6f35ecebd2d5a984f239062c36d39 Mon Sep 17 00:00:00 2001
From: Katherine Defliese
Date: Wed, 18 Nov 2015 13:45:51 -0800
Subject: [PATCH 21/86] Updated routes to remove vendor redundancies
---
config/routes.rb | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/config/routes.rb b/config/routes.rb
index 95fd99a8..e2c02fbc 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,8 +1,6 @@
Rails.application.routes.draw do
root 'static_pages#index'
- resources :markets do
- resources :vendors
- end
+ resources :markets
resources :vendors do
member do
get 'sales/' => 'sales#index'
From de245b3775775a06c4bce04d7829b9f17b3ef01b Mon Sep 17 00:00:00 2001
From: Jennie Buechner
Date: Wed, 18 Nov 2015 14:14:03 -0800
Subject: [PATCH 22/86] style homepage - still needs work
---
app/assets/images/market_background.jpg | Bin 0 -> 574067 bytes
app/assets/stylesheets/application.scss | 45 ++++++++++++++++++++++--
app/views/layouts/_header.html.erb | 20 +++++++++++
app/views/layouts/application.html.erb | 12 ++++---
app/views/static_pages/index.html.erb | 4 ++-
5 files changed, 73 insertions(+), 8 deletions(-)
create mode 100644 app/assets/images/market_background.jpg
create mode 100644 app/views/layouts/_header.html.erb
diff --git a/app/assets/images/market_background.jpg b/app/assets/images/market_background.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..8905b6db38dffc9b0abe159fa5465c9c4f883a32
GIT binary patch
literal 574067
zcmeFa1zc2H_dk4wp}Pg?R-}m-|NwH&f06QwfEY4uN~){FMIY!_TK`OXVo;-00?*pKm-6_
ze_4a_yd%;RiE>1`v5O0d0Me&5&*9<%;DPg+83()qILtVg0c~XjyOXPp1DqXc&u+u+
zZR6nt_w>aE>^;1kJW=d62s?IfxC7kN#?}Q620cLzJJQS34vF+&x3}?dg?sR!*j;Tr
zoZ+6#ICy}#+J8ll5g@j;fjK*PAiWTF%s7ky9t`P%^uSVt2b8^+3pRjn2O8pZK;qhg
zmSTBOxXr;G7i-Od(4kpa63^br7JiTnu00ZYn6kYG9Oa0OBs!oFa1`oL6l?f_zJra2
z9UO7Mbnt*5Quqhdfg}-VCJYW%)IkW}5pLt+d5|E%A?b_NBymE38la5`&jT@BR~y7Z
z1pfEB0EYz*bSR65M0}(0ksdY(
z2RK%d0O{digK&ajX?!=ho7=ZiyE(ZW#N)dmJ#9RZhtVERutVDk+&qwWUa$iRydP;n
zJ#2iif>6+Y>>by`$?ZUd1my*$`-}Z3ANXM#;Cb4hJP(RT{L@*mx&&a*;ag1+cstpG
znHC~hJ-LjxX1T;CAD<{JpydK?+g+T8F1xyb-t2(_D^P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