Permalink
Browse files

Fix some stuff.

  • Loading branch information...
mfine committed Apr 13, 2012
1 parent 9194fc9 commit c903e717244b9cf1a6da6bda33da99e69383366f
Showing with 2 additions and 24 deletions.
  1. +0 −6 lib/ranked/api.rb
  2. +2 −5 lib/ranked/result.rb
  3. +0 −2 views/navbar.haml
  4. +0 −11 views/players.haml
View
@@ -36,12 +36,6 @@ def link_class(path)
haml :index
end
- get "/players" do
- authenticate
- @players = Player.all
- haml :players
- end
-
get "/players/:id" do |id|
authenticate
@player = Player.find(:id => id)
View
@@ -10,14 +10,11 @@ def loser_user
end
def oponent(player)
- [winner_user, loser_user].reject { |p| p == player }.first
+ [winner_user, loser_user].reject { |p| p == player.user }.first
end
def result(player)
- {
- winner_id => "win",
- loser_id => "loss",
- }[player.id]
+ { winner_id => "win", loser_id => "loss" }[player.id]
end
end
end
View
@@ -8,8 +8,6 @@
%a.brand{:href => '/'} Ranked
.nav-collapse
%ul.nav
- %li{:class => link_class("/players")}
- %a{:href => '/players'}Players
%li{:class => link_class("/results")}
%a{:href => '/results'}Results
%ul.nav.pull-right
View
@@ -1,11 +0,0 @@
-.container
-
- %table.table.table-condensed.table-striped
- %thead
- %tr
- %th User
- %tbody
- - @players.each do |player|
- %tr
- %td
- %a{:href=>"/players/#{player.id}"}= player.user

0 comments on commit c903e71

Please sign in to comment.