Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Commit

Permalink
Added Games and Users nav links. Renamed game_server to game_servers
Browse files Browse the repository at this point in the history
  • Loading branch information
jwang47 committed Mar 8, 2013
1 parent ad8dcf1 commit c2df7f2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 1,4 @@
class GameServerController < ApplicationController
class GameServersController < ApplicationController

def check_servers
GameServer.check_servers()
Expand Down
2 changes: 2 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 23,8 @@
<div class="nav-collapse">
<ul class="nav pull-right">
<% if user_signed_in? %>
<li><%= link_to "Games", game_servers_path %></li>
<li><%= link_to "Users", users_path %></li>
<li><%= link_to "Logged in as " current_user.email, "javascript:void(0)" %></li>
<li><%= link_to "Logout", destroy_user_session_path, :method => :delete %></li>
<% else %>
Expand Down
10 changes: 5 additions & 5 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,12 1,13 @@
CoPlatform::Application.routes.draw do

root :to => 'users#index'
root :to => 'game_servers#index'

post 'friendships' => 'friendships#create'
get 'friendships' => 'friendships#index'

get 'users/:id/friends' => 'users#friends'

get 'users' => 'users#index', :as => 'users'
devise_for :users
devise_scope :users do
namespace :api do
Expand All @@ -16,10 17,9 @@
end
end

get 'game_server/:id/heartbeat' => 'game_server#heartbeat'
get 'game_server/check' => 'game_server#check_servers'

resources :game_server
get 'game_servers/:id/heartbeat' => 'game_servers#heartbeat'
get 'game_servers/check' => 'game_servers#check_servers'
resources :game_servers

# The priority is based upon order of creation:
# first created -> highest priority.
Expand Down

0 comments on commit c2df7f2

Please sign in to comment.