about summary refs log tree commit diff stats
path: root/data/maps/the_great/rooms/Maze Wreck Area.txtpb
diff options
context:
space:
mode:
Diffstat (limited to 'data/maps/the_great/rooms/Maze Wreck Area.txtpb')
0 files changed, 0 insertions, 0 deletions
8c'>^
837537b ^



7789e21 ^
b62d43c ^



b2f6c33 ^
b62d43c ^


b2f6c33 ^
b62d43c ^
7789e21 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
                                             

                                             
           
                                                           



                                                    
     



                   
                                                                                                  


                      
                                                                                  
       
   
class GamesController < ApplicationController
  helper_method :sort_column, :sort_direction

  def index
    @games = Game.order(sort_column + " " + sort_direction)

    if params[:status]
      @games = @games.where(status: params[:status])
    end
  end

  private

    def sort_column
      (params[:sort] and Game.column_names.include?(params[:sort])) ? params[:sort] : "started_on"
    end

    def sort_direction
      (params[:dir] and %[asc desc].include?(params[:dir])) ? params[:dir] : "asc"
    end
end