1
0

Toggling quantity primariness from nutrients view

This commit is contained in:
cryptogopher
2019-11-01 21:43:56 +01:00
parent 09c441f662
commit cf9c913897
12 changed files with 174 additions and 102 deletions

View File

@@ -0,0 +1,16 @@
module BodyTracking
module ApplicationControllerPatch
ApplicationController.class_eval do
private
# :find_* methods are called before :authorize,
# @project is required for :authorize to succeed
def find_quantity
@quantity = Quantity.find(params[:id])
@project = @quantity.project
rescue ActiveRecord::RecordNotFound
render_404
end
end
end
end