SwiftkickWeb / FOODweek

Code for the meal planning app, Food Week
http://www.foodweek.me
0 stars 0 forks source link

Aggregate ingredients #42

Closed johnhutch closed 7 years ago

johnhutch commented 8 years ago

Notes doc: https://docs.google.com/document/d/1JF_WcArG7Wh36Jird-XzhDhUWjq2_xVAIVGTcKcDxb0/edit

Branch: issue_42-aggregate_ingredients

johnhutch commented 7 years ago

Ready for code review, @jon-athan-hall

jon-athan-hall commented 7 years ago

/app/controllers/meal_plans_controller.rb I'm trying to think if there's a reason to add :grocery_list to the before_action :authenticate_user! line too. Are we cool with any user seeing the grocery list for any meal plan? Or should they own it?

/app/helpers/recipe_helper.rb empty RecipeHelper module?

/app/models/recipe.rb Aren't there symbols for start/end of line too? Would that be better? I also thiiiiink your regex should do the trick though haha.

We may need a more complex pluralizing method. For example: 4 eggs, the ingredient is pluralized not the unit. 2 cups milk, the unit is pluralized here.

johnhutch commented 7 years ago
  1. good call on adding to before_action :authenticate. When in doubt, lock it down.

  2. woops! i ended up moving the helper to application helper. removed!

  3. That's YOUR regex! I just copied it over. I took it for granted you thought it out. Should we adjust it?

  4. Good call.

johnhutch commented 7 years ago

@jon-athan-hall take a look at the above commit?

jon-athan-hall commented 7 years ago

Wonderful.

I merged branch issue_42-aggregate_ingredients into master.