Guest User

Untitled

a guest
Mar 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. class Var < ActiveRecord::Base
  2.  
  3. @@current_vars = Var.find(:first, :order => "year DESC")
  4. class << self
  5. def current_year
  6. @@current_vars.year
  7. end
  8.  
  9. def current_start_date
  10. @@current_vars.start_date
  11. end
  12.  
  13. def current_end_date
  14. @@current_vars.end_date
  15. end
  16.  
  17. def current_discount
  18. @@current_vars.discount
  19. end
  20.  
  21. def current_preregistration_ends
  22. @@current_vars.preregistration_ends
  23. end
  24.  
  25. def current_verify_service
  26. @@current_vars.verify_service
  27. end
  28.  
  29. def current_previous_year_start
  30. @@current_vars.previous_year_start
  31. end
  32.  
  33. def current_previous_year_end
  34. @@current_vars.previous_end_date
  35. end
  36.  
  37. end
  38.  
  39. end
Add Comment
Please, Sign In to add comment