Guest User

Untitled

a guest
Jul 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. module Report
  2.  
  3. class EmployerApplicationReport
  4.  
  5. attr_accessor :job, :archived
  6.  
  7. def initialize(options = {})
  8. options ||= {}
  9. options.reverse_merge!(:archived => false)
  10. options.each do |k, v|
  11. send("#{k}=", v) if respond_to?("#{k}=")
  12. end
  13. end
  14.  
  15. def applications
  16. if archived
  17. job.job_applications.all
  18. else
  19. job.job_applications.active
  20. end
  21. end
  22.  
  23. end
  24.  
  25. end
Add Comment
Please, Sign In to add comment