This file contains 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
$(function() { | |
$("#game_classes th a, #game_classes .pagination a").on("click", function() { | |
$.getScript(this.href); | |
return false; | |
}); | |
$("#game_classes_search input").keyup(function() { | |
$.get($("#game_classes_search").attr("action"), $("#game_classes_search").serialize(), null, "script"); | |
return false; | |
}); | |
}); |
This file contains 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
<table class="pretty"> | |
<thead> | |
<tr> | |
<th><%= sortable "name" %></th> | |
<th>Description</th> | |
<th><%= sortable "game_id" %></th> | |
<th></th> | |
<th></th> | |
<th></th> | |
</tr> |
This file contains 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
def index | |
@game_classes = GameClass.order("game_id").page(params[:page]).per(15) | |
@game_classes = GameClass.order(params[:sort]).page(params[:page]).per(15) if params[:sort] | |
#@game_classes = @game_classes.all | |
respond_to do |format| | |
format.html # index.html.erb | |
format.json { render json: @game_classes } | |
end | |
end |
This file contains 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
encoding: UTF-8 | |
# This file is auto-generated from the current state of the database. Instead | |
# of editing this file, please use the migrations feature of Active Record to | |
# incrementally modify your database, and then regenerate this schema definition. | |
# | |
# Note that this schema.rb definition is the authoritative source for your | |
# database schema. If you need to create the application database on another | |
# system, you should be using db:schema:load, not running all the migrations | |
# from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
# you'll amass, the slower it'll run and the greater likelihood for issues). |
NewerOlder