mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-09 09:24:23 -05:00
Update payments_controller.rb
This commit is contained in:
@@ -12,7 +12,7 @@ class PaymentsController < ApplicationController
|
|||||||
|
|
||||||
include AuthHelper
|
include AuthHelper
|
||||||
|
|
||||||
before_filter :add_payments, :authorize
|
before_filter :find_project, :authorize
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@payment = Payment.new
|
@payment = Payment.new
|
||||||
@@ -37,6 +37,11 @@ end
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def find_project
|
||||||
|
# @project variable must be set before calling the authorize filter
|
||||||
|
@project = Project.find(params[:project_id])
|
||||||
|
end
|
||||||
|
|
||||||
def only_one_non_zero?( array )
|
def only_one_non_zero?( array )
|
||||||
found_non_zero = false
|
found_non_zero = false
|
||||||
array.each do |val|
|
array.each do |val|
|
||||||
|
|||||||
Reference in New Issue
Block a user