Update payments_controller.rb

This commit is contained in:
2017-03-23 05:03:58 -04:00
committed by GitHub
parent c0ae01018b
commit f7357f30ce

View File

@@ -12,7 +12,7 @@ class PaymentsController < ApplicationController
include AuthHelper include AuthHelper
before_filter :find_project, User.current.allowed_to?(:add_paypments, @project) before_filter :check_permissions
def new def new
@payment = Payment.new @payment = Payment.new
@@ -37,9 +37,8 @@ end
private private
def find_project def check_permissions
# @project variable must be set before calling the authorize filter return User.current.allowed_to?(:add_paypments, Project.find(params[:project_id]))
@project = Project.find(params[:project_id])
end end
def only_one_non_zero?( array ) def only_one_non_zero?( array )