Skip to content

Commit

Permalink
Merge pull request #366 from sul-dlss/set-output-file
Browse files Browse the repository at this point in the history
Set output_file param for expenditure_report
  • Loading branch information
dlrueda committed Feb 1, 2017
2 parents f222b23 + 6f189bd commit 8dcde9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/expenditure_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ExpenditureReport < ActiveRecord::Base
validates :fund_begin, presence: true, if: 'fund.nil?'
validates :date_type, inclusion: %w(fiscal calendar paydate)

before_save :set_fund, :write_dates
before_save :set_fund, :write_dates, :set_output_file
before_save :check_fy, if: 'date_type == "fiscal"'
before_save :check_cal, if: 'date_type == "calendar"'
before_save :check_pd, if: 'date_type == "paydate"'
Expand Down Expand Up @@ -104,4 +104,8 @@ def write_dates
self[:date_request] = Time.zone.now
self[:date_ran] = nil
end

def set_output_file
self[:output_file] = output_file
end
end

0 comments on commit 8dcde9e

Please sign in to comment.