Skip to content
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

Completed project #81

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Completed project #81

wants to merge 16 commits into from

Conversation

alyssahursh
Copy link

  • I would still like to deploy to Heroku.

  • I still have to write tests.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alyssahursh

Overall well done, the site looks great and has optional functionality. However the API Wrapper was a bit sloppily implemented mixing with the controller and of course testing wasn't done.

Overall it's good, but a few things to finish before turning this into a great portfolio piece.


def signed_in?
!!current_user
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why two !

@user = user
session[:user_id] = user.id
end
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of helper methods here.

session[:search_terms].shift
end
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice a maximum of 5 remembered search terms!

@recent_search_terms = session[:search_terms]

@recipes = EdamamApiWrapper.search_results(params[:q], params[:from], params[:to], params["health1"], params["health2"], params["diet1"])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should create a Recipe class which encapsulates the concept of a recipe and lets you separate your controller from the nitty-gritty details of the API's implementation.

Similarly to how we did the Slack Channel.

@@ -0,0 +1,52 @@
require 'httparty'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to create a Recipe class to encapsulate the Recipe concept which lets your controller not have to be concerned with the details of the API.

@@ -0,0 +1,39 @@
require 'test_helper'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few passing tests & no api testing.

@@ -0,0 +1,208 @@
/*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be a little better organized, but that's knitpicking.

@@ -0,0 +1,86 @@
<!DOCTYPE html>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest using a bit more semantic HTML in your views rather than wrapping everything in divs. However that's a minor criticism.

get '/favorites', to: 'pages#favorites', as: 'favorites'

resources :recipes, :sessions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARG! Unused Routes!

GAAAAAAAH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants