Scoped all controllers inside body_trackers
Fixed main menu item highlighting
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
class BodyTrackersController < ApplicationController
|
||||
menu_item :body_trackers
|
||||
|
||||
before_action :find_project_by_project_id, only: [:index, :defaults]
|
||||
before_action :authorize
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
class IngredientsController < ApplicationController
|
||||
require 'csv'
|
||||
|
||||
menu_item :body_trackers
|
||||
|
||||
before_action :init_session_filters
|
||||
before_action :find_project_by_project_id,
|
||||
only: [:index, :nutrients, :create, :import, :filter, :filter_nutrients]
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
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 :authorize
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
class QuantitiesController < ApplicationController
|
||||
menu_item :body_trackers
|
||||
|
||||
before_action :init_session_filters
|
||||
before_action :find_project_by_project_id, only: [:index, :parents, :create, :filter]
|
||||
before_action :find_quantity, only: [:edit, :update, :destroy, :toggle, :move]
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
class SourcesController < ApplicationController
|
||||
menu_item :body_trackers
|
||||
|
||||
before_action :find_project_by_project_id, only: [:index, :create]
|
||||
before_action :find_source, only: [:destroy]
|
||||
before_action :authorize
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
class UnitsController < ApplicationController
|
||||
menu_item :body_trackers
|
||||
|
||||
before_action :find_project_by_project_id, only: [:index, :create]
|
||||
before_action :find_unit, only: [:destroy]
|
||||
before_action :authorize
|
||||
|
||||
Reference in New Issue
Block a user