1
0

Renamed: column -> exposure

Moved toggle_column_options to body_trackers helper
This commit is contained in:
cryptogopher
2020-04-25 15:42:22 +02:00
parent 5e3322fe96
commit a4781b4fcd
18 changed files with 57 additions and 55 deletions

View File

@@ -10,7 +10,7 @@ class FoodsController < ApplicationController
before_action :init_session_filters
before_action :find_project_by_project_id,
only: [:index, :new, :create, :nutrients, :filter, :autocomplete, :import]
before_action :find_quantity_by_quantity_id, only: [:toggle_column]
before_action :find_quantity_by_quantity_id, only: [:toggle_exposure]
before_action :find_food, only: [:edit, :update, :destroy, :toggle]
before_action :authorize
@@ -62,7 +62,7 @@ class FoodsController < ApplicationController
prepare_nutrients
end
def toggle_column
def toggle_exposure
@project.nutrient_exposures.toggle!(@quantity)
prepare_nutrients
end

View File

@@ -7,9 +7,9 @@ class MeasurementsController < ApplicationController
before_action :init_session_filters
before_action :find_project_by_project_id, only: [:index, :new, :create, :filter]
before_action :find_quantity_by_quantity_id, only: [:toggle_column]
before_action :find_quantity_by_quantity_id, only: [:toggle_exposure]
before_action :find_measurement, only: [:edit, :update, :destroy, :retake]
before_action :find_measurement_routine, only: [:readouts, :toggle_column]
before_action :find_measurement_routine, only: [:readouts, :toggle_exposure]
before_action :authorize
def index
@@ -82,7 +82,7 @@ class MeasurementsController < ApplicationController
prepare_readouts
end
def toggle_column
def toggle_exposure
@routine.readout_exposures.toggle!(@quantity)
prepare_readouts
end