1
0

Allow binding goal saving w/o exposures and disallow destruction

This commit is contained in:
cryptogopher
2020-08-22 23:17:24 +02:00
parent 8f0e718b4a
commit cf0e14d87d
6 changed files with 51 additions and 33 deletions

View File

@@ -1,6 +1,13 @@
module Concerns::Finders
private
def find_goal(id = params[:id])
@goal = Goal.find(id)
@project = @goal.project
rescue ActiveRecord::RecordNotFound
render_404
end
def find_meal
@meal = Meal.find(params[:id])
@project = @meal.project