Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

can rate

  • Loading branch information...
commit 034c43a3d8d111ac9cb66387e5d39eea2530c99c 1 parent 5eb5335
@paulanthonywilson paulanthonywilson authored
View
1  .gitignore
@@ -13,3 +13,4 @@
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
+cfpdump.sql
View
2  app/views/proposals/show.html.erb
@@ -42,7 +42,7 @@
<p>Please rate this proposal</p>
<% end -%>
- <% form_for :rating, :url=>{:action=>:rate}, :html=>{:method=>:put, :id => "form_rating", :style => 'display: none'} do |f| %>
+ <%= form_for :rating, :url=>rate_proposal_path, :html=>{:method=>:put, :id => "form_rating", :style => 'display: none'} do |f| %>
<div class="row">
<%= f.label 'score'%>
<%= select_tag "rating[score]", options_for_select([1,2,3,4,5], (@rating.score if @rating))%>
View
13 config/database.yml
@@ -4,10 +4,17 @@
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
- adapter: sqlite3
- database: db/development.sqlite3
+ adapter: postgresql
+ encoding: unicode
+ database: src_cfp2012
pool: 5
- timeout: 5000
+ username: submissions
+ password: b1gp4ws
+ host: localhost
+ # adapter: sqlite3
+ # database: db/development.sqlite3
+ # pool: 5
+ # timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
View
6 config/routes.rb
@@ -2,7 +2,11 @@
match 'reviewer_sessions/callback' => 'reviewer_sessions#callback', :as=>:oauth_callback
resources :reviewer_sessions, :only=>[:new, :destroy]
- resources :proposals, :only=>[:index, :show], :member=>{:rate=>:put}
+ resources :proposals, :only=>[:index, :show] do
+ member do
+ put :rate
+ end
+ end
namespace :admin do |admin|
resources :ratings, :only=>[:index] do
Please sign in to comment.
Something went wrong with that request. Please try again.