This rule was added in rubocop 1.79. We were inconsistent about it, so we're adding it to get more consistency.
29 lines
539 B
Ruby
29 lines
539 B
Ruby
module Budgets
|
|
class GroupsController < ApplicationController
|
|
include FeatureFlags
|
|
|
|
feature_flag :budgets
|
|
|
|
before_action :load_budget
|
|
before_action :load_group, only: [:show]
|
|
authorize_resource :budget
|
|
authorize_resource :group, class: "Budget::Group"
|
|
|
|
def show
|
|
end
|
|
|
|
def index
|
|
end
|
|
|
|
private
|
|
|
|
def load_budget
|
|
@budget = Budget.find_by_slug_or_id! params[:budget_id]
|
|
end
|
|
|
|
def load_group
|
|
@group = @budget.groups.find_by_slug_or_id! params[:id]
|
|
end
|
|
end
|
|
end
|