From aaa77bb893697bce0f33cac0e789e1c8cf06d6cb Mon Sep 17 00:00:00 2001 From: differentreality Date: Mon, 2 Sep 2013 15:58:09 +0300 Subject: [PATCH] allow stars from 1 to 10, 1 star being the default --- app/models/call_for_papers.rb | 2 +- app/views/admin/callforpapers/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/call_for_papers.rb b/app/models/call_for_papers.rb index 17dd74e8..f3915b75 100644 --- a/app/models/call_for_papers.rb +++ b/app/models/call_for_papers.rb @@ -3,6 +3,6 @@ class CallForPapers < ActiveRecord::Base belongs_to :conference validates_presence_of :start_date, :end_date, :hard_deadline - validates :rating, :numericality => { :greater_than_or_equal_to => 2, :less_than_or_equal_to => 10 } + validates :rating, :numericality => { :greater_than_or_equal_to => 1, :less_than_or_equal_to => 10 } end diff --git a/app/views/admin/callforpapers/show.html.haml b/app/views/admin/callforpapers/show.html.haml index 6757dff7..68eb1f41 100644 --- a/app/views/admin/callforpapers/show.html.haml +++ b/app/views/admin/callforpapers/show.html.haml @@ -9,6 +9,6 @@ = f.input :hard_deadline, :as => :string, :input_html => { :id => "cfp-hard-datepicker", :readonly => "readonly" } = f.input :description, :hint => "Welcome text for the Call for Papers" = f.input :schedule_changes - = f.input :rating, :hint => "Enter the number of different rating levels you want to have for voting on proposals." + = f.input :rating, :input_html => {:value => 1}, :hint => "Enter the number of different rating levels you want to have for voting on proposals." = f.input :rating_desc, :label => "Rating Description", :hint => "Enter comments about voting process.", :input_html => {:value => "1 is for 'I don't like this proposal',\n2 is for 'I am ok with this proposal.',\n3 is for 'I love this proposal!'", :rows => 5, :class => "span6"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}