Commit 0d1f1e29c980a192c3af9bc59d4e0af353500a09

Authored by Chap Ambrose
1 parent bac804f3

add votes route

Showing 2 changed files with 2 additions and 2 deletions   Show diff stats
config/database.yml
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 3
4 development: &default 4 development: &default
5 adapter: mysql 5 adapter: mysql
6 - database: rebirth_development 6 + database: pairwise_development
7 pool: 5 7 pool: 5
8 timeout: 5000 8 timeout: 5000
9 9
config/routes.rb
@@ -14,7 +14,7 @@ ActionController::Routing::Routes.draw do |map| @@ -14,7 +14,7 @@ ActionController::Routing::Routes.draw do |map|
14 question.resources :items 14 question.resources :items
15 question.resources :prompts, :member => {:skip => :post, :vote => :post}, 15 question.resources :prompts, :member => {:skip => :post, :vote => :post},
16 :collection => {:single => :get, :index => :get} 16 :collection => {:single => :get, :index => :get}
17 - question.resources :choices, :member => {:flag => :put} 17 + question.resources :choices, :member => {:flag => :put, :votes => :get}
18 end 18 end
19 map.resources :algorithms 19 map.resources :algorithms
20 map.connect "/questions/:question_id/prompts/:id/vote/:index", :controller => 'prompts', :action => 'vote' 20 map.connect "/questions/:question_id/prompts/:id/vote/:index", :controller => 'prompts', :action => 'vote'