Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6d9c128
Created models and relationships between models. Have not migrated.
nurlywhirly Oct 4, 2016
4c254b8
Migrated tables.
nurlywhirly Oct 4, 2016
c6f7192
Route setup, try #1.
nurlywhirly Oct 4, 2016
2561eae
Created empty controllers for market, vendor, product, sale
nurlywhirly Oct 4, 2016
dbaf9a7
Added empty methods to market, product, vendor, sale controllers.
yenicapotediaz Oct 4, 2016
8247ea5
Set up and migrated seed data, added headers to .csvs, forced primary…
nurlywhirly Oct 4, 2016
2e6f74b
Added rails-erd gem and generated a diagram
nurlywhirly Oct 5, 2016
7346af6
Rough outputted list of all markets completed on market/index.html.erb
nurlywhirly Oct 5, 2016
83f011b
Market index page laid out in a table with actions on individual markets
nurlywhirly Oct 5, 2016
eb09351
Created market_form partial and added it to market/new and market/edit
nurlywhirly Oct 5, 2016
07ddfe6
Built skeleton of market/show page with full functionality
nurlywhirly Oct 5, 2016
f9af157
Changed all view headers in market as <h3>s
nurlywhirly Oct 5, 2016
9c94d68
created homepage and its css stylesheet as well as application.html.e…
yenicapotediaz Oct 5, 2016
98c81b6
Merge branch 'b/nmu+ycd/master' of https://github.com/nurlywhirly/Far…
yenicapotediaz Oct 5, 2016
2be1daf
Added all standard views for vendor-related stuff.
nurlywhirly Oct 5, 2016
503be4e
created stylesheet for market home and market show.
yenicapotediaz Oct 5, 2016
b98903c
Merge branch 'b/nmu+ycd/master' of https://github.com/nurlywhirly/Far…
yenicapotediaz Oct 5, 2016
eb7bee8
Created Vendor/Products index page, partial products_forms and views.…
nurlywhirly Oct 6, 2016
d03c8d1
Sucessfully got destroy id from view all products by vendor index page.
nurlywhirly Oct 6, 2016
9b77825
Fixed problem on vendor/product/show page bc I was pointing to vendor…
nurlywhirly Oct 6, 2016
4c4d4d1
Tested deleting and adding products for a vendor successfully
nurlywhirly Oct 6, 2016
795f815
worked on vendor pages layout, included nav bar in the application la…
yenicapotediaz Oct 6, 2016
20cc48e
Solved problem where you could only edit a product once.
nurlywhirly Oct 6, 2016
7a02de3
Merge branch 'b/nmu+ycd/master' of https://github.com/nurlywhirly/Far…
nurlywhirly Oct 6, 2016
982725d
Fixed all forms where the table begins inside the form code and not o…
nurlywhirly Oct 6, 2016
05b4d07
Added strong params in market, product, and vendor controllers
nurlywhirly Oct 6, 2016
9c58a38
Got markets to show its vendors.
nurlywhirly Oct 6, 2016
ae70640
Made the add new vendor link dependant on you being a market
nurlywhirly Oct 6, 2016
071b4a8
We tried to do something in the vendor model, but decided to stop.
nurlywhirly Oct 6, 2016
e75e4bf
Added all the pages for sales-related things, most links probably work.
nurlywhirly Oct 7, 2016
65f19a2
Added a mixin for methods to determine which path we're on - vendor, …
nurlywhirly Oct 7, 2016
226ac6b
cleaned up css and layout for market.
yenicapotediaz Oct 7, 2016
9550fcb
Merge branch 'b/nmu+ycd/master' of https://github.com/nurlywhirly/Far…
nurlywhirly Oct 7, 2016
a0b1d1e
Updated .gitignore
nurlywhirly Oct 7, 2016
c5da663
Fixed forms for conditionally filling in ID field where possible usin…
nurlywhirly Oct 7, 2016
6915ac9
Adding class names to partial forms table elements
nurlywhirly Oct 7, 2016
8583eb0
Fixing routes yet again.
nurlywhirly Oct 7, 2016
0e2fd7c
cleaned up styles for product
yenicapotediaz Oct 7, 2016
48e5dba
Merge branch 'b/nmu+ycd/master' of https://github.com/nurlywhirly/Far…
yenicapotediaz Oct 7, 2016
c8179d7
Trying to fix the problems I caused by fixing routes
nurlywhirly Oct 7, 2016
c85ab21
Added last month's sales as a list on vendor/sales page.
nurlywhirly Oct 7, 2016
3e37f59
First draft of project to deploy to Heroku
nurlywhirly Oct 7, 2016
32fa813
Updating gemfile to deploy to heroku
yenicapotediaz Oct 7, 2016
6b9b917
adding Gemfile.lock
yenicapotediaz Oct 7, 2016
6012ab8
testing correct links to nav bar
yenicapotediaz Oct 9, 2016
5590a17
testing correct links to nav bar -take 2
yenicapotediaz Oct 9, 2016
19dbdb9
testing correct links to nav bar -take 3
yenicapotediaz Oct 9, 2016
f7e6b30
fixed links in homepage from localhost:3000 to actual path links
yenicapotediaz Oct 9, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@
/log/*
!/log/.keep
/tmp

# .DS B.S.
*.DS_Store
*/.DS_Store
.DS_Store*
10 changes: 9 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.7'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
Expand All @@ -23,6 +23,7 @@ gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

gem 'graphviz'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

Expand All @@ -35,6 +36,12 @@ gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
gem 'sqlite3'
end

group :production do
gem 'pg'
gem 'rails_12factor'
end

group :development do
Expand All @@ -46,4 +53,5 @@ group :development do

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'rails-erd'
end
18 changes: 18 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ GEM
debug_inspector (>= 0.0.1)
builder (3.2.2)
byebug (9.0.6)
choice (0.2.0)
coderay (1.1.1)
coffee-rails (4.1.1)
coffee-script (>= 2.2.0)
Expand All @@ -59,6 +60,7 @@ GEM
execjs (2.7.0)
globalid (0.3.7)
activesupport (>= 4.1.0)
graphviz (0.3.0)
i18n (0.7.0)
jbuilder (2.6.0)
activesupport (>= 3.0.0, < 5.1)
Expand All @@ -82,6 +84,7 @@ GEM
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
pg (0.19.0)
pkg-config (1.1.7)
pry (0.10.4)
coderay (~> 1.1.0)
Expand Down Expand Up @@ -109,8 +112,18 @@ GEM
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-erd (1.5.0)
activerecord (>= 3.2)
activesupport (>= 3.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (4.2.7)
actionpack (= 4.2.7)
activesupport (= 4.2.7)
Expand All @@ -119,6 +132,7 @@ GEM
rake (11.3.0)
rdoc (4.2.2)
json (~> 1.4)
ruby-graphviz (1.2.2)
sass (3.4.22)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
Expand Down Expand Up @@ -164,10 +178,14 @@ DEPENDENCIES
binding_of_caller
byebug
coffee-rails (~> 4.1.0)
graphviz
jbuilder (~> 2.0)
jquery-rails
pg
pry-rails
rails (= 4.2.7)
rails-erd
rails_12factor
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
spring
Expand Down
3 changes: 3 additions & 0 deletions app/assets/javascripts/market.coffee
Original file line number Diff line number Diff line change
@@ -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/
3 changes: 3 additions & 0 deletions app/assets/javascripts/product.coffee
Original file line number Diff line number Diff line change
@@ -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/
3 changes: 3 additions & 0 deletions app/assets/javascripts/sale.coffee
Original file line number Diff line number Diff line change
@@ -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/
3 changes: 3 additions & 0 deletions app/assets/javascripts/vendor.coffee
Original file line number Diff line number Diff line change
@@ -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/
183 changes: 183 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,186 @@
main {
margin-bottom: 10%;
}

a:hover {
color: #666699;
}

a {
color: #F5B19A;
font-family: 'Quicksand';
text-decoration: none;
}

.homepage-buttons a{
color: white;
text-decoration: none;
}

.homepage-buttons a:hover {
color: white;
}
h6 {
text-align: center;
font-family: 'Quicksand', serif;
color: #F5B19A;
}
h1 {
text-align: center;
font-family: 'Quicksand', serif;
font-size: 4em;
color: #F5B19A;
/*background-color: #efefef;*/
}

/*main {
margin-top: 30px;
}*/

.add-market {
margin-top: 5%;
text-align: center;
}

.market-table {
margin-left: 29%;
}

.market-table tr {
color: grey;
}

.market-form, .product-form-partial, .sale-form-partial {
margin-left: 20%;
}

.market-details {
margin-left: 20%;
}

.table-product-action {
text-align: center;
}

.table-info td, .table-product td {
padding-right: 3%;
color: #F5B19A;
}

.table-product {
margin-left: 42%;
column-width: auto;
}


.name-title {
text-align: center;
font-family: 'Quicksand', sans-serif;
color: #F5B19A;
}

nav{
margin-left: 8%;
margin-bottom: 5%;
}

nav a {
color: grey;
}

.top-buttons li {
display: inline;
font-family: 'Julius Sans One', sans-serif;
border-bottom: 2pt solid #F5B19A;
color: #666699;
/*previous color #39324b*/
margin-right: 8%;
margin-left: 8%;
padding: 5px 25px;
font-size: 9pt;
}

footer {
font-family: 'Bad Script', sans-serif;
color: #F5B19A;
right: 0;
bottom: 0;
left: 0;
background-color: #efefef;
text-align: center;
margin-top: 5%;
position: fixed;
}

/*.bottom-buttons li{
display: inline;
font-family: 'Julius Sans One', sans-serif;
border-right: 2pt solid #39324b;
color: #39324b;
margin-right: 8%;
margin-left: 8%;
padding: 0px 25px;
font-size: 9pt;
}*/


h3 {
text-align: center;
font-family: 'Quicksand', serif;
letter-spacing: 5px;
font-size: 5em;
color: white;
border-radius: 25px;
background-size: 280px 260px;
margin: 0 10%;
background-repeat: repeat;
opacity: 0.7;
background-image: url("http://abwatercolors.com/wp-content/uploads/2012/11/farmersMarket.jpg");
}

/*middle pictures in home page*/
h2 {
text-align: center;
font-family: 'Quicksand', serif;
letter-spacing: 5px;
font-size: 5em;
color: white;
border-radius: 25px;
background-size: 280px 260px;
padding: 3% 3%;
margin: 5% 10%;
background-repeat: repeat;
opacity: 0.7;
background-image: url("http://abwatercolors.com/wp-content/uploads/2012/11/farmersMarket.jpg");
}

table {
margin: 0 17%;
font-family: 'Quicksand', sans-serif;
font-size: 14px;
line-height: 25px;
}

th {
border-bottom: 2pt solid grey;
text-align: left;
}

main table {
/*margin-top: 6%;*/
margin-left: 35%;
}

footer a {
color: #F5B19A;
}
/*.table-top * {
margin: 0 20%;
}

.table-info * {
margin-right: 10%;
}*/
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
Expand Down
3 changes: 3 additions & 0 deletions app/assets/stylesheets/market.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the market controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/product.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the product controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/sale.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the sale controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
4 changes: 4 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception

def index

end
end
4 changes: 4 additions & 0 deletions app/controllers/homepage_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class HomepageController < ApplicationController
def index
end
end
48 changes: 48 additions & 0 deletions app/controllers/market_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
class MarketController < ApplicationController
def index
@markets = Market.all
end

def create
@market = Market.create(market_params)

redirect_to root_path
end

def new
@market = Market.new
end

def edit
@market = Market.find(params[:id])
end

def show
@market = Market.find(params[:id])
end

def update
@market = Market.find(params[:id])

if @market.update(market_params)
redirect_to market_path
else
render :edit
end
end

def destroy
@market = Market.find(params[:id]).destroy

redirect_to market_index_path
end

####### STRONG PARAMS #########

private

def market_params
params.require(:market).permit(:name, :address, :city, :county, :state, :zip)
end

end
Loading