surveyor 0.6.9 → 0.6.10
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/VERSION +1 -1
- data/app/controllers/surveyor_controller.rb +1 -0
- data/app/models/question.rb +1 -0
- data/app/views/surveyor/edit.html.haml +2 -2
- data/surveyor.gemspec +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -7,12 +7,12 @@ Surveyor is a rails (gem) plugin, that brings surveys to your rails app. Before
|
|
7
7
|
As a plugin:
|
8
8
|
|
9
9
|
sudo gem install haml
|
10
|
-
script/plugin install git://github.com/breakpointer/surveyor.git -r 'tag v0.6.
|
10
|
+
script/plugin install git://github.com/breakpointer/surveyor.git -r 'tag v0.6.10'
|
11
11
|
|
12
12
|
Or as a gem plugin:
|
13
13
|
|
14
14
|
# in environment.rb
|
15
|
-
config.gem "surveyor", :version => '>=0.6.
|
15
|
+
config.gem "surveyor", :version => '>=0.6.10', :source => 'http://gemcutter.org'
|
16
16
|
|
17
17
|
sudo gem install gemcutter
|
18
18
|
gem tumble
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.10
|
@@ -40,6 +40,7 @@ class SurveyorController < ApplicationController
|
|
40
40
|
@survey = Survey.with_sections.find_by_id(@response_set.survey_id)
|
41
41
|
@sections = @survey.sections
|
42
42
|
@section = params[:section] ? @sections.with_includes.find(section_id_from(params[:section])) || @sections.with_includes.first : @sections.with_includes.first
|
43
|
+
@questions = @section.questions.in_order
|
43
44
|
else
|
44
45
|
flash[:notice] = "Unable to find your responses to the survey"
|
45
46
|
redirect_to(available_surveys_path)
|
data/app/models/question.rb
CHANGED
@@ -20,12 +20,12 @@
|
|
20
20
|
%span.title= @section.title
|
21
21
|
.questions
|
22
22
|
- group_questions ||= []
|
23
|
-
- @
|
23
|
+
- @questions.each_with_index do |question, index|
|
24
24
|
- unless question.part_of_group?
|
25
25
|
= render(:partial => "/partials/question", :locals => {:question => question, :response_set => @response_set})
|
26
26
|
- else # gather up the group questions
|
27
27
|
- group_questions << question
|
28
|
-
- if (index + 1 >= @
|
28
|
+
- if (index + 1 >= @questions.size) or (question.question_group_id != @questions[index + 1].question_group_id)
|
29
29
|
- # this is the last question of the section, or the group
|
30
30
|
= render(:partial => "/partials/question_group", :locals => {:question_group => question.question_group, :response_set => @response_set, :group_questions => group_questions})
|
31
31
|
- group_questions = []
|
data/surveyor.gemspec
CHANGED