forked from AdaGold/betsy
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ditzy Pull Request #2
Open
jadevance
wants to merge
303
commits into
Ada-C5:master
Choose a base branch
from
pottery123:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
303 commits
Select commit
Hold shift + click to select a range
6637223
Merge branch 'master' of github.com:pottery123/betsy
cotarg cd5a7c4
merge conflict resolved in schema
leahnp 5c11af6
Merge branch 'master' into leah/merchant_accounts
leahnp 518b984
Managing merge conflicts
jadevance 1a77f77
moving the review link to the product detail pages.
cotarg fcbf63a
moved review link to product_details so that it would just call on th…
cotarg 243bf26
amending reviews controller to call on products methods now instead o…
cotarg 56109c1
Migrated data after merge
jadevance efa0d35
Merge branch 'master' into jv-shopping-cart
jadevance 67732c9
migrated new db
leahnp 9195c96
Merge branch 'master' into leah/merchant_accounts
leahnp e385dd6
added a url column for picture urls.
cotarg be5232a
Merge branch 'master' of github.com:pottery123/betsy
cotarg 35ec5de
updated schema by running db migrate.
cotarg ee4c780
trying to add schema so I can push
leahnp 19aaa69
changed schema to resolve merge conflict
leahnp 1146a94
updated seed file so columns match table columns.
cotarg 1075e70
Merge branch 'master' of github.com:pottery123/betsy
cotarg 3f8a8f6
Wrote a CSV slurpee to take in Rowan's seed data for products.
jadevance 7345765
ran rake
cotarg aea2d6e
working on integrating reviewing products.
cotarg ad38d76
Created a ditzy controller to handle the landing page. Added a logo.
jadevance 87a49e7
Merge branch 'master' of github.com:pottery123/betsy
jadevance 3625915
working out some show method problems. refactor opportunity here.
cotarg ba2e012
amended this page to display products, removed logged in user specifi…
cotarg 2f3a62b
amended this page to show review link. link displays *unless* they sh…
cotarg 052a65e
Merge branch 'master' of github.com:pottery123/betsy
cotarg c59a5c9
We linked up login and logout and wrote logic to handle view if a use…
jadevance 899dd31
Merge branch 'master' of github.com:pottery123/betsy
jadevance 0a86825
working on integrating reviews with products.
cotarg d305748
Merge branch 'master' of github.com:pottery123/betsy
cotarg 1f53fa9
refactoring to find the bug.
cotarg bffd0e1
making each product detail page display the reviews for that product.
cotarg 4fcea59
Added support to render image urls
jadevance 4935ea4
wrking on show by merchant/show by category.
cotarg eff6e4c
this is some seed products.
cotarg e393d2c
Merge branch 'master' of github.com:pottery123/betsy
cotarg 215eb97
fixed some typos that broke my images.
cotarg 89b32fb
added manually written route.
cotarg c8bf91d
tweaking display of home page images
jadevance 4513d8f
commented out one route that was breaking my code
leahnp 09239ff
Added images to individual product pages.
jadevance 1131506
added routes to render merchant dashboard view
leahnp 7ac25f3
fixed landing page so all products page is linked below
jadevance fdade41
added buttons to each product on the /products page
jadevance 1a04b6d
Merge branch 'master' of github.com:pottery123/betsy
jadevance b9695ce
Merge branch 'jv-buy-button'
jadevance 86b2fe7
working on bug showing all reviews on each page
cotarg c086dbf
Fixed routes to edit items from products
jadevance d251ca8
Merge branch 'master' of github.com:pottery123/betsy
jadevance 3e11cdb
added column to add catagory, realized I need a catagory table and to…
leahnp 4ee75dd
added some sweet font awesome font styling for bonus awesomez
jadevance ce380a6
seeded order items for display purposes on the new order page
jadevance cdd6cd1
added a form for guest payment info to the new order page.
jadevance 57efadb
formatting, added p tags around items to make spacing uniform
jadevance 48ca4c3
added a model and schema for billing info. Still need to validate ema…
jadevance 1767e3a
email validations working now.
jadevance 09794d9
Added billing validation and linked to the new order form.
jadevance 06bc22d
migrated databases, added catagories table and changed catagories col…
leahnp 5d3b033
wrote product view by merchant.
cotarg eaa61d4
amending some things to enable viewing of reviews and products by mer…
cotarg a5a96e1
Merge branch 'master' of github.com:pottery123/betsy
cotarg c20cb6b
dealt with merge conflicts
leahnp bb7da00
fixed this to remove duplicate table migration.
cotarg 262fcb2
deleted these to force rails and active record to do the thing.
cotarg b414b2a
schema from updated database incorporating billings and categories.
cotarg 979154d
apparently my merge into master did not work, trying again
leahnp 424d2e0
Merge branch 'leah/dashboard'
leahnp 7d57186
added route to view by category.
cotarg b3f0590
adding view to view by category.
cotarg 7a0c294
all the things required to make the categories work.
cotarg 76e4848
setting up required files for category objects.
cotarg ce100eb
working on categories. need to delete bad table and migrate name column.
cotarg a38ba6f
removing some typos, fixing some tables, adding some columns.
cotarg 047cf9a
adding create a product section, nothing is hooked up
leahnp 6435d92
trying to merge
leahnp 4ca61b3
wrote migrations to fix wrong column, add to right table.
cotarg 001c1f7
working on adding catagory still, need to grab new migration from master
leahnp 784f7b2
Added seed data to orders
jadevance 2124310
merge conflict in routes
leahnp 2ac7dc0
Merge branch 'master' of github.com:pottery123/betsy
jadevance 0edfe40
created form to add new category
leahnp cfe74d9
adding categories now working
leahnp 7f6d668
adding form for merchants to add new products, need to find solution …
leahnp debe259
worked out linking and looking up by category.
cotarg 63bec55
establishing category relationships
cotarg 76dcbeb
worked out many to many with products
cotarg acaff66
view to display by categories.
cotarg 14e2c64
working on displaying products in category.
cotarg 6856313
added link to seller to each product on index, links to list of produ…
cotarg ee5d68c
changed a typo.
cotarg 5cf83f8
schema changed via catgory migrations.
cotarg b0f038a
linked categories and products.
cotarg 4d9e351
removed constraint from user_id column in orders table.
cotarg e911dab
Merge branch 'master' of github.com:pottery123/betsy
jadevance 936723e
rowan created new migration, need to pull in master
leahnp 97a3968
merge conflict, adjusted categories controller
leahnp ef0a001
working on view products by category.
cotarg bd6eead
add product form displaying, not hooked up in the back end, weird but…
leahnp b9b2b7f
sessions now work for logging in / creating an order id
jadevance a489151
I need to drop my catagory table in products, going to do it...
leahnp b9dcced
removed catagories column from products table, changed the seed produ…
leahnp 66889f9
added list of all categories to merchant dashboard
leahnp 95c5b83
added raise to work on how I will pop out the catagories so I can add…
leahnp ba3dc00
omg the cart works
jadevance 886a7fa
working on linking up orders/completing a purchase from the cart of o…
jadevance f11900a
Merge branch 'master' of github.com:pottery123/betsy
jadevance b48a7e2
Merge branch 'jv-cart'
jadevance 5274968
Redirected ditzy index to /products, removing the ditzy separate cont…
jadevance c006202
removed ditzy controller
jadevance dc91def
Fixed login issue where it was redirecting to the wrong path
jadevance 26e2137
Added a new method to sessions to handle the instantiation of a new c…
jadevance 620b87d
removed raise from method I was testing, grouped new with create so c…
jadevance be74558
created radio buttons for catagories, so merchants can assign more th…
leahnp 00eafbe
commented out belongs_to in catagory
leahnp c337db8
got multiple categories saving for new product
leahnp d31dba9
outlined the order process to roll in confirmation of billing complete.
jadevance dc8dc96
added list of merchant's products to their dashboard page
leahnp 959f5e8
added button to edit products from merchant dashboard
leahnp 7915340
hooked up edit product form
leahnp 503a929
finished edit form, want to make visible edit some radio buttons
leahnp bc89c0c
made radio buttons for visiblity field in product udpate, toggle true…
leahnp 0b81267
added line to indicate if product was visible or not visible to buyers
leahnp 7bde3c3
made merchant products on dashboard a table
leahnp bce0926
adding bootstrap.
cotarg 2e14d02
Wrote my first passing test for order items, yay
jadevance cfe45af
going to push to master
leahnp f52ef70
merge conflicts
leahnp 942338b
removed old root path
leahnp 2045b9d
redirect to product detail view after posting review now.
cotarg 7b32f3e
commented out duplicate route, needs refactor.
cotarg 076ae8a
made logo into link to return to home page.
cotarg 933cfdd
rolled billings into orders schema
jadevance a66383b
managing merge conflicts
jadevance 7e09e8e
Merge branch 'master' of github.com:pottery123/betsy
jadevance c6984f7
redirect to login after creating account.
cotarg 93c4eda
changed it so that item picture and item title are in the same li, us…
cotarg 4699661
added dashboard link to nav bar in layouts/application view.
cotarg 78e0764
Removed billing model
jadevance 58aa974
fixed bug that wasn't allowing us to add categories.
cotarg d114bed
making sure you can't leave a review if it's your product.
cotarg bd4d7f6
commented out params hash to view page.
cotarg 973d1c1
Fixed order seeding data
jadevance 8f58a8e
working on checkout billing form
pottery123 a60272c
tracked down and got rid of bug making it impossible to show vendor o…
cotarg fca5ff9
added status column to orders
pottery123 2b3f85b
merge conflict
leahnp 830aa68
dashboard link works now. yay.
cotarg 83dc889
changed a user id in seed data to avoid having to make a billion user…
cotarg 9258c72
re-added image tag to display images for products that include a url …
cotarg 749e069
included descriptions of products on each product page.
cotarg 4b66e44
fixed a bug on individual product pages where the requested item was …
jadevance 959fbe1
trying to fix @user bug
leahnp b840f75
tried changing an instance variable name to see if we were having col…
cotarg 3f7eac4
added list of categories to homepage, user can click and browse produ…
leahnp 297a37e
allowed merchants to edit product and add/remove categories from all …
leahnp 2361baf
made sure unathenticated users cannot view dashboards and merchants c…
leahnp e81f568
fixed viewing dashboard bug
leahnp 8f80c4f
Wrote a clear cart method and a completing order method. show.html.er…
jadevance 59dfd56
merging route conflict
jadevance e562a50
products views now only show visible products
leahnp a298505
merge conflicts managed
jadevance 83c3935
merge conflict
leahnp eea1a7f
save to database
pottery123 e7973a9
Generated migration to add total column to orders model. Created a pe…
jadevance d9413a9
Wrote a migration to drop the table billings from schema.rb
jadevance 09f265e
cleaned up the reduce inventory method, prepared to interface and tes…
jadevance 4ce9aa4
added rails-erd to Gemfile to generate ERD for updating our pretty one.
cotarg f87daad
Merge branch 'master' of github.com:pottery123/betsy
cotarg 67f5243
writing some validations and trying to display errors. error display …
cotarg 27207aa
wrote a controller filter to keep people from accessing account pages…
cotarg f3d3415
updated controller filter to work with people who are not logged in, …
cotarg 194b07f
fixed merge conflict
pottery123 a0f8daa
merge conflicts
jadevance a52993f
Merge branch 'master' of github.com:pottery123/betsy
jadevance 26f1c60
adding simplecov gem to development
jadevance 522a8df
working on displaying errors from validations.
cotarg 084c548
Added a link to the cart to the main page
jadevance d942bb0
Merge branch 'master' of github.com:pottery123/betsy
jadevance 1aff15d
Added in a google font to make things look nicer
jadevance 8887778
added link to dashboard to direct merchants to a order fulfillment page
leahnp 1f2c3b4
Got bootstrap working through a gem. Added new products to seed data …
jadevance 4aed7f8
working on checkout bugs
jadevance 7024a4f
displaying merchant order items to order fulfillment page, need to ad…
leahnp f93fd1c
added shipped table, order items for specific merchant showing on ord…
leahnp 989c009
wrote a better statement to display orderitems for specific merchant
leahnp 9aa17d6
added link order_item details page, that lists info about that order …
leahnp bdb9597
working on table to display unshipped order items
leahnp a86087d
merchants can mark items shipped now and order item will move into th…
leahnp 93c5acf
added quantity, subtotal to shipped item info
leahnp a3eed70
Found a routing bug on the order complete page as well as params bug …
jadevance 6551009
added shipping to confirmation page. First item displays, need to loo…
jadevance 62d66ce
sorted unshippped products by order number
leahnp 2fc77b1
bootstrapping the main page
jadevance f1e5209
beginning work on tests for products and products controller.
cotarg 4548dac
merchants can see total revenue by status, number of orders by status
leahnp c029a9d
merchant can view order info to see user name/cc/address/etc
leahnp 7b9a0b0
styling, standardized font sizes for headings so they don't look janky
jadevance f9f8d16
clickable image link on the landing page, yay
jadevance 6995e7e
fixed a mistake in the clickable image where I forgot to path it, oops
jadevance 2ebc4d8
wrote first test. validating presence of name.
cotarg 43952d5
removing coverage from tracking.
cotarg 8787d68
wrote a fixture for testing products controller.
cotarg e8e75ca
adding simplecov and writing tests.
cotarg 5de6774
fixing simplecov to test rails, finished up product validation tests.
cotarg 65c3254
Merge branch 'rowan/trying-out-tests'
cotarg 2ba02b1
Styled individual product pages, sorted out some display bugs.
jadevance f5fa8bd
Merge branch 'master' of github.com:pottery123/betsy
jadevance c678144
working on routes
cotarg ced3b37
Merge branch 'master' of github.com:pottery123/betsy
cotarg 43963ed
edited routes. refactor to remove deprecated routes once fully tested.
cotarg c8308f2
took out where clause in merchant show orders controller
leahnp 8280ab7
going to merge
leahnp c172272
merge conflicts
leahnp 3dc4d27
commiting
pottery123 77ad4af
Confirmation page now works properly yaaay
jadevance f54c58c
commits
pottery123 886ea64
merge conflicts
pottery123 df3b5a7
added unit tests for users
leahnp 94b5274
added link to product details to show merchant name
leahnp 1f8eb51
added link from product details page to merchants store page, working…
leahnp 2cb8d39
listed all merchant products on merchant store page
leahnp 0694fe4
styled the reviews page, everything lines up and has the same padding…
jadevance 8939d95
styled the billing page
jadevance 0249c08
Standardized view of order complete page and cart page Added fancy fo…
jadevance c3e8257
merge conflict
leahnp 6e663d4
redirected user back to create review page if they try to enter a rev…
leahnp 57fb74a
fixed an error on product details, styled the mechant dashboard and o…
jadevance 4dd6f43
fixed a totaling bug on the confirmation page. Added logic to handle …
jadevance 56bbadb
finished styling the confirmation page
jadevance ec02473
added in image responsiveness to product details, fixed a div-splosio…
jadevance 95273be
Merge branch 'master' of github.com:pottery123/betsy
jadevance bf8ce12
fixed a bug where if a product does not have a merchant (seed data), …
jadevance 3bd25cd
parsed time for credit card expiration mm-yy
leahnp a0cb3b7
Merge branch 'master' of github.com:pottery123/betsy
leahnp 84640e9
fixed a migration file
jadevance b12f84e
db migrate problems, extra end
leahnp 76b678e
Styled login page
jadevance 9be4f50
merge conflict in migration
leahnp 39cbc1d
adding drop down menu for expiration date, need a migration
leahnp 6b8e4a4
new migration that changes orders, expiration on cc to string
leahnp e511477
created drop down style month/year for expiration date on cc form
leahnp d494f58
Cleaned up and standardized the CSS on the pages. Cleaned up comments…
jadevance 6843b2c
Merge branch 'master' of github.com:pottery123/betsy
jadevance d7158a6
added a sweet favicon to site
jadevance d4e03b7
Took out some placeholder logic
jadevance 8ddc0e9
fixed a bug in the seed data
jadevance fe00328
added image responsiveness to merchant store images so they are not g…
jadevance 40c4b7b
Fixed a bug on the merchant dashboard
jadevance 9ec6c79
Styled edit products page
jadevance File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/** MAIN STYLING **/ | ||
|
||
@import "bootstrap-sprockets"; | ||
@import "bootstrap"; | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
html { | ||
font-family: 'Palanquin', sans-serif; | ||
font-size: 1rem; | ||
} | ||
|
||
main { | ||
padding: 1rem; | ||
} | ||
|
||
h1 { | ||
color: #42bad3; /* ditzy bright blue */ | ||
font-weight: lighter; | ||
font-size: 2.5rem; | ||
padding: 1rem; | ||
margin: 0rem; | ||
} | ||
|
||
h2 { | ||
color: #d8563d; /* ditzy red */ | ||
font-size: 1.5rem; | ||
padding: 1rem; | ||
} | ||
|
||
h3 { | ||
color: #42bad3; /* ditzy bright blue */ | ||
font-size: 1.5rem; | ||
padding: 1rem; | ||
} | ||
|
||
h4 { | ||
|
||
color: #3f52b8; /* ditzy dark blue */ | ||
font-size: 1.5rem; | ||
padding: 1rem; | ||
|
||
} | ||
|
||
span { | ||
color: #3f52b8; /* ditzy dark blue */ | ||
} | ||
|
||
a { | ||
color: #3f52b8; /* ditzy dark blue */ | ||
} | ||
|
||
p { | ||
color: #3f52b8; /* ditzy dark blue */ | ||
font-size: 1rem; | ||
padding: 1rem; | ||
} | ||
|
||
li { | ||
color: #42bad3; /* ditzy bright blue */ | ||
list-style-type: circle; | ||
} | ||
|
||
|
||
hr.dark-blue { | ||
border: 0.1rem solid #3f52b8; | ||
padding: 0rem; | ||
margin: 0rem; | ||
} | ||
|
||
hr.bright-blue { | ||
border: 0.1rem solid #42bad3; | ||
padding: 0rem; | ||
margin: 0rem; | ||
} | ||
|
||
.thumnbnail { | ||
display: inline-block; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
.caption { | ||
display: inline-block; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
.caption p { | ||
font-size: 0.8rem; | ||
margin: 0; | ||
} | ||
|
||
.btn { | ||
margin-left: 0.5rem; | ||
} | ||
|
||
/** FONT AWESOME **/ | ||
|
||
.fa { | ||
color: #3f52b8; /* ditzy dark blue */ | ||
font-size: 3rem !important; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the categories controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the OrderItem controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the orders controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the reviews controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the sessions controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the users controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
class CategoriesController < ApplicationController | ||
|
||
# we could use this to run a clickable list of categories that will enable folks to see what all the categories are. | ||
def index | ||
end | ||
|
||
def show_by_category | ||
@merchant = User.find(params[:id]) | ||
@products = Product.where(user_id: @merchant.id) | ||
|
||
render :categories_products | ||
end | ||
# if merchant && merchant.authenticate(params[:password]) | ||
# merchant_session[:merchant_id] = merchant.id | ||
# redirect_to root_url, :notice => "Merchanthas been logged in" | ||
# else | ||
# flash.now[:error] = "Invalid username or password." | ||
# @title = "Merchant Signin" | ||
# render "new" | ||
# end | ||
def new | ||
@category = Category.new | ||
end | ||
|
||
def create | ||
# if category_create_params[:category][:name] == "" | ||
# flash.now[:error] = "Please Enter a Catagory Name" | ||
# raise | ||
# end | ||
@category = Category.new(category_create_params[:category]) | ||
if @category.save | ||
redirect_to dashboard_path(current_user.id) | ||
else | ||
# this sucks - place holder for the moment | ||
render :bad_route | ||
|
||
# redirect_to dashboard_path(current_user.id) | ||
end | ||
end | ||
|
||
private | ||
def category_create_params | ||
# if category_create_params[:category][:name] == "" | ||
# flash.now[:error] = "Please Enter a Catagory Name" | ||
# raise | ||
# end | ||
params.permit(category: [:name]) | ||
end | ||
end | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that you commented to explain the colors! Easy to see what each are for