1
0

Added setting taken_at in measurement form

Changed action toggle -> retake
This commit is contained in:
cryptogopher
2019-12-01 01:08:09 +01:00
parent fc2db76a3e
commit 54040a2764
10 changed files with 48 additions and 20 deletions

View File

@@ -2,7 +2,7 @@ class MeasurementsController < ApplicationController
menu_item :body_trackers
before_action :find_project_by_project_id, only: [:index, :create]
before_action :find_measurement, only: [:destroy, :toggle]
before_action :find_measurement, only: [:destroy, :retake]
before_action :authorize
def index
@@ -31,11 +31,10 @@ class MeasurementsController < ApplicationController
flash[:notice] = 'Deleted measurement'
end
prepare_measurements
render :toggle
render :index
end
def toggle
@measurement.toggle_hidden!
def retake
prepare_measurements
end