1
0

Update to Redmine 5/Rails 6

This commit is contained in:
cryptogopher
2023-12-07 17:01:42 +01:00
parent 71bfc5a33a
commit a784ca6514
15 changed files with 19 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
module Concerns::Finders
module Finders
private
def find_goal(id = params[:id])

View File

@@ -5,7 +5,7 @@ class FoodsController < ApplicationController
menu_item :body_trackers
helper :body_trackers
include Concerns::Finders
include Finders
before_action :init_session_filters
before_action :find_project_by_project_id,

View File

@@ -3,7 +3,7 @@ class GoalsController < ApplicationController
menu_item :body_trackers
helper :body_trackers
include Concerns::Finders
include Finders
before_action :find_project_by_project_id, only: [:index, :new, :create]
before_action :find_goal, only: [:edit, :update, :destroy]

View File

@@ -1,5 +1,5 @@
class IngredientsController < ApplicationController
include Concerns::Finders
include Finders
before_action :authorize
end

View File

@@ -3,7 +3,7 @@ class MealsController < ApplicationController
menu_item :body_trackers
helper :body_trackers
include Concerns::Finders
include Finders
before_action :find_project_by_project_id, only: [:index, :new, :create]
before_action :find_quantity_by_quantity_id, only: [:toggle_exposure]

View File

@@ -1,5 +1,5 @@
class MeasurementRoutinesController < ApplicationController
include Concerns::Finders
include Finders
before_action :find_measurement_routine, only: [:show, :edit]
before_action :authorize

View File

@@ -3,7 +3,7 @@ class MeasurementsController < ApplicationController
menu_item :body_trackers
helper :body_trackers
include Concerns::Finders
include Finders
before_action :init_session_filters
before_action :find_project_by_project_id, only: [:index, :new, :create, :filter]

View File

@@ -3,7 +3,7 @@ class QuantitiesController < ApplicationController
menu_item :body_trackers
helper :body_trackers
include Concerns::Finders
include Finders
before_action :init_session_filters
before_action :find_project_by_project_id, only: [:index, :new, :create, :filter, :parents]
@@ -123,7 +123,7 @@ class QuantitiesController < ApplicationController
end
def prepare_quantities
@quantities = @project.quantities.filter(@project, session[:q_filters])
@quantities = @project.quantities.apply_filter(@project, session[:q_filters])
.includes(:exposures, :formula, :parent)
end
end

View File

@@ -3,7 +3,7 @@ class ReadoutsController < ApplicationController
menu_item :body_trackers
helper :body_trackers
include Concerns::Finders
include Finders
before_action :find_measurement_routine_by_measurement_routine_id,
only: [:index, :toggle_exposure]

View File

@@ -3,7 +3,7 @@ class TargetsController < ApplicationController
menu_item :body_trackers
helper :body_trackers
include Concerns::Finders
include Finders
before_action :find_goal_by_goal_id, only: [:index, :new, :create, :show, :edit, :update,
:destroy, :reapply, :toggle_exposure]

View File

@@ -2,7 +2,7 @@ class UnitsController < ApplicationController
layout 'body_tracking'
menu_item :body_trackers
include Concerns::Finders
include Finders
before_action :find_project_by_project_id, only: [:index, :create]
before_action :find_unit, only: [:destroy]