Created
December 11, 2009 16:05
-
-
Save mileszs/254296 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # @tickets is an array of ActiveRecord objects | |
| # The numbers against which the timeframe_id is getting checked | |
| # correspond to IDs for specific timeframes in the database | |
| # FIXME: Do not leave this in the controller. | |
| @emergency = @tickets.select {|t| t.timeframe_id == 1} | |
| @four_hours = @tickets.select {|t| t.timeframe_id == 2} | |
| @next_bd = @tickets.select {|t| t.timeframe_id == 3} | |
| @two_days = @tickets.select {|t| t.timeframe_id == 4} | |
| @week = @tickets.select {|t| t.timeframe_id == 5} | |
| @specific = @tickets.select {|t| t.timeframe_id == 6} | |
| # FIXME: Do not leave this in the controller. | |
| @general = @tickets.select {|t| t.ticket_type_id == 3 } | |
| @recurring = @tickets.select { |t| t.ticket_type_id == 6 } | |
| @sub = @tickets.select { |t| t.ticket_type_id == 5 } | |
| @nvision = @tickets.select { |t| t.ticket_type_id == 4 } | |
| @email = @tickets.select { |t| t.ticket_type_id == 1 } | |
| @phone = @tickets.select { |t| t.ticket_type_id == 2 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment