1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
body_tracking/app/controllers/meals_controller.rb
cryptogopher 8e8160c41a Renamed Ingredient -> Food
Ingredient is now part of composition (meal/recipe/dish)
2020-04-14 19:44:19 +02:00

22 lines
439 B
Ruby

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(:foods)
end
end