Permalink
Browse files

add wicked and southie routes

  • Loading branch information...
1 parent cd61fb1 commit 65b412f85add780088497a2fe984e759e00033f5 @mikepmunroe committed Mar 20, 2013
@@ -0,0 +1,6 @@
+class SouthieController < ApplicationController
+ def index
+ @athletes = Athlete.where(:affiliate => 'southie').order("total asc")
+ end
+end
+
@@ -0,0 +1,6 @@
+class WickedController < ApplicationController
+ def index
+ @athletes = Athlete.where(:affiliate => 'wicked').order("total asc")
+ end
+end
+
@@ -0,0 +1,32 @@
+<h1>Athletes</h1>
+<table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Affiliate</th>
+ <th>Age</th>
+ <th>13.1</th>
+ <th>13.2</th>
+ <th>13.3</th>
+ <th>13.4</th>
+ <th>13.5</th>
+ <th>Total</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% @athletes.each do |athlete| %>
+ <tr>
+ <td><%= link_to athlete.name, "http://games.crossfit.com#{athlete.url}" %></td>
+ <td><%= athlete.affiliate %></td>
+ <td><%= athlete.age %></td>
+ <td><%= athlete.w1 %></td>
+ <td><%= athlete.w2 %></td>
+ <td><%= athlete.w3 %></td>
+ <td><%= athlete.w4 %></td>
+ <td><%= athlete.w5 %></td>
+ <td><%= athlete.total %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
@@ -0,0 +1,32 @@
+<h1>Athletes</h1>
+<table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Affiliate</th>
+ <th>Age</th>
+ <th>13.1</th>
+ <th>13.2</th>
+ <th>13.3</th>
+ <th>13.4</th>
+ <th>13.5</th>
+ <th>Total</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% @athletes.each do |athlete| %>
+ <tr>
+ <td><%= link_to athlete.name, "http://games.crossfit.com#{athlete.url}" %></td>
+ <td><%= athlete.affiliate %></td>
+ <td><%= athlete.age %></td>
+ <td><%= athlete.w1 %></td>
+ <td><%= athlete.w2 %></td>
+ <td><%= athlete.w3 %></td>
+ <td><%= athlete.w4 %></td>
+ <td><%= athlete.w5 %></td>
+ <td><%= athlete.total %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
View
@@ -1,62 +1,8 @@
GamesFilter::Application.routes.draw do
- root :to => 'athletes', :action => :index
+ root :to => 'wicked', :action => :index
resources :athletes
- # The priority is based upon order of creation:
- # first created -> highest priority.
-
- # Sample of regular route:
- # match 'products/:id' => 'catalog#view'
- # Keep in mind you can assign values other than :controller and :action
-
- # Sample of named route:
- # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
- # This route can be invoked with purchase_url(:id => product.id)
-
- # Sample resource route (maps HTTP verbs to controller actions automatically):
- # resources :products
-
- # Sample resource route with options:
- # resources :products do
- # member do
- # get 'short'
- # post 'toggle'
- # end
- #
- # collection do
- # get 'sold'
- # end
- # end
-
- # Sample resource route with sub-resources:
- # resources :products do
- # resources :comments, :sales
- # resource :seller
- # end
-
- # Sample resource route with more complex sub-resources
- # resources :products do
- # resources :comments
- # resources :sales do
- # get 'recent', :on => :collection
- # end
- # end
-
- # Sample resource route within a namespace:
- # namespace :admin do
- # # Directs /admin/products/* to Admin::ProductsController
- # # (app/controllers/admin/products_controller.rb)
- # resources :products
- # end
-
- # You can have the root of your site routed with "root"
- # just remember to delete public/index.html.
- # root :to => 'welcome#index'
-
- # See how all your routes lay out with "rake routes"
-
- # This is a legacy wild controller route that's not recommended for RESTful applications.
- # Note: This route will make all actions in every controller accessible via GET requests.
- # match ':controller(/:action(/:id))(.:format)'
-end
+ match 'wicked' => 'wicked#index'
+ match 'southie' => 'southie#index'
+ end

0 comments on commit 65b412f

Please sign in to comment.