Merge branch 'master' into feature/2275#destroy_budgets

This commit is contained in:
BertoCQ
2018-01-09 11:03:51 +01:00
committed by GitHub
19 changed files with 182 additions and 49 deletions

View File

@@ -27,7 +27,7 @@ class Admin::BudgetsController < Admin::BaseController
def update
if @budget.update(budget_params)
redirect_to admin_budget_path(@budget), notice: t('admin.budgets.update.notice')
redirect_to admin_budgets_path, notice: t('admin.budgets.update.notice')
else
render :edit
end

View File

@@ -1,5 +1,6 @@
class BudgetsController < ApplicationController
include FeatureFlags
include BudgetsHelper
feature_flag :budgets
load_and_authorize_resource
@@ -9,6 +10,7 @@ class BudgetsController < ApplicationController
respond_to :html, :js
def show
raise ActionController::RoutingError, 'Not Found' unless budget_published?(@budget)
end
def index