Change deprecated *_filter methods to *_action

This commit is contained in:
Patrick Gansterer 2019-10-28 21:11:35 +01:00
parent bee671c90e
commit 2100c738af
39 changed files with 66 additions and 66 deletions

View file

@ -1,5 +1,5 @@
class Finance::BankTransactionsController < ApplicationController
before_filter :authenticate_finance
before_action :authenticate_finance
inherit_resources
def index

View file

@ -1,5 +1,5 @@
class Finance::BaseController < ApplicationController
before_filter :authenticate_finance
before_action :authenticate_finance
def index
@financial_transactions = FinancialTransaction.includes(:ordergroup).order('created_on DESC').limit(8)

View file

@ -1,5 +1,5 @@
class Finance::FinancialLinksController < Finance::BaseController
before_filter :find_financial_link, except: [:create]
before_action :find_financial_link, except: [:create]
def show
@items = @financial_link.bank_transactions.map do |bt|

View file

@ -1,7 +1,7 @@
# encoding: utf-8
class Finance::FinancialTransactionsController < ApplicationController
before_filter :authenticate_finance
before_filter :find_ordergroup, :except => [:new_collection, :create_collection, :index_collection]
before_action :authenticate_finance
before_action :find_ordergroup, :except => [:new_collection, :create_collection, :index_collection]
inherit_resources
# belongs_to :ordergroup

View file

@ -1,7 +1,7 @@
class Finance::InvoicesController < ApplicationController
before_filter :find_invoice, only: [:show, :edit, :update, :destroy]
before_filter :ensure_can_edit, only: [:edit, :update, :destroy]
before_action :find_invoice, only: [:show, :edit, :update, :destroy]
before_action :ensure_can_edit, only: [:edit, :update, :destroy]
def index
@invoices = Invoice.includes(:supplier, :deliveries, :orders).order('date DESC').page(params[:page]).per(@per_page)