Update to Redmine 5/Rails 6
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
module Concerns::Finders
|
||||
module Finders
|
||||
private
|
||||
|
||||
def find_goal(id = params[:id])
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class IngredientsController < ApplicationController
|
||||
include Concerns::Finders
|
||||
include Finders
|
||||
|
||||
before_action :authorize
|
||||
end
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class MeasurementRoutinesController < ApplicationController
|
||||
include Concerns::Finders
|
||||
include Finders
|
||||
|
||||
before_action :find_measurement_routine, only: [:show, :edit]
|
||||
before_action :authorize
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user