1
0

Adding Meals, WIP

This commit is contained in:
cryptogopher
2020-04-13 15:36:59 +02:00
parent ced06a25bc
commit c3010a70e8
8 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
class MealsController < ApplicationController
layout 'body_tracking'
menu_item :body_trackers
helper :body_trackers
include Concerns::Finders
before_action :find_project_by_project_id, only: [:index, :new, :create]
before_action :find_meal, only: [:edit, :update, :destroy]
before_action :authorize
def index
prepare_meals
end
private
def prepare_meals
@meals = @project.meals.includes(:ingredients)
end
end