Conversation
Cw/user profile
Can only create a category on the category/show page if you are logge…
some styling for the users#show page
…ders_controller for the checkout process
products can now be created with categories
…cific product. Have not tested yet
…testing in order, orderproducts and products tomorrow
Cw/views fixes
removing
Cw/views fixes
final deployment for show
removed duplicate price
proceed to checkout
bEtsyWhat We're Looking For
IMPORTANT: Whoever submitted the PR (and thus will get the notification about this feedback) should share this with their teammates. |
| validates :credit_card_name, presence: true | ||
| validates :credit_card_number, presence: true | ||
| validates :credit_card_cvv, presence: true | ||
| validates :billing_zip_code, presence: true |
There was a problem hiding this comment.
More validations would be good, but you probably ran out of time.
| class Item < ApplicationRecord | ||
| belongs_to :product | ||
| belongs_to :order, optional: true | ||
| validates :shipping_status, inclusion: {in: [true,false]} |
There was a problem hiding this comment.
It seems that you could combine shipping status and purchase status
| validates :shipping_status, inclusion: {in: [true,false]} | ||
| validates :purchase_status, inclusion: {in: [true,false]} | ||
|
|
||
| def purchase(input_order_id) |
There was a problem hiding this comment.
Good that you're putting business logic in the model.
|
|
||
| def has_billing_datum? | ||
| if self.order_status != "pending" | ||
| self.errors[:billing_datum_id] << "is missing. Please entire valid billing information." if !(self.billing_datum_id) |
| end | ||
|
|
||
| #gets called if check_for_duplicates returns true | ||
| #TODO: Julia removed below method. Does not appear to be applied in any part of the project. |
There was a problem hiding this comment.
Good idea to leave notes like this for future work.
| @@ -0,0 +1,41 @@ | |||
| require "test_helper" | |||
|
|
|||
| describe SessionsController do | |||
There was a problem hiding this comment.
What about a test for when a user visits the callback path without logging in?
| must_redirect_to product_path(products(:converse).id) | ||
| end | ||
|
|
||
| it "If correct info is not provided, render new" do |
There was a problem hiding this comment.
What is this doing in the controller test?
|
|
||
| get product_path(products(:converse).id) | ||
|
|
||
| controller.instance_variable_get("@current_user_is_not_product_owner").must_equal false |
There was a problem hiding this comment.
This should probably just be a test for redirect
| name: product.name + " updated" | ||
| } | ||
| } | ||
| patch product_path(product), params: product_datum |
There was a problem hiding this comment.
Shouldn't you use a must... something
|
|
||
|
|
||
| describe "new" do | ||
| it "can reach a new category" do |
There was a problem hiding this comment.
What about guest vs logged in users?
bEtsy
Congratulations! You're submitting your assignment! These comprehension questions should be answered by all members of your team, not by a single teammate.
Comprehension Questions