Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Report
- class EmployerApplicationReport
- attr_accessor :job, :archived
- def initialize(options = {})
- options ||= {}
- options.reverse_merge!(:archived => false)
- options.each do |k, v|
- send("#{k}=", v) if respond_to?("#{k}=")
- end
- end
- def applications
- if archived
- job.job_applications.all
- else
- job.job_applications.active
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment