census 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
@@ -3,14 +3,14 @@
|
|
3
3
|
<% fields_for "user[answers_attributes][#{user.answers.index(answer)}]", answer do |builder| -%>
|
4
4
|
<%= builder.hidden_field :id %>
|
5
5
|
<%= builder.hidden_field :question_id %>
|
6
|
-
<div class="text_field">
|
6
|
+
<div class="text_field" id="<%=h question.prompt.parameterize %>">
|
7
7
|
<%= builder.label :data, question.prompt %>
|
8
8
|
<%= builder.text_field :data %>
|
9
9
|
</div>
|
10
10
|
<% end -%>
|
11
11
|
|
12
12
|
<% elsif question.multiple? -%>
|
13
|
-
<div class="checkboxes">
|
13
|
+
<div class="checkboxes" id="<%=h question.prompt.parameterize %>">
|
14
14
|
<%= label_tag question.prompt %>
|
15
15
|
<ul>
|
16
16
|
<% question.choices.each do |choice| -%>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<% fields_for "user[answers_attributes][#{user.answers.index(answer)}]", answer do |builder| -%>
|
33
33
|
<%= builder.hidden_field :id %>
|
34
34
|
<%= builder.hidden_field :question_id %>
|
35
|
-
<div class="select_field">
|
35
|
+
<div class="select_field" id="<%=h question.prompt.parameterize %>">
|
36
36
|
<%= builder.label :data, question.prompt %>
|
37
37
|
<%= builder.collection_select :data, question.choices, :value, :value, :include_blank => true %>
|
38
38
|
</div>
|
@@ -1,9 +1,10 @@
|
|
1
1
|
<div class="census_answers">
|
2
2
|
<% DataGroup.all.each do |group| -%>
|
3
|
+
<div id="<%=h group.name.parameterize %>">
|
3
4
|
<h3><%=h group.name %></h3>
|
4
5
|
<ul>
|
5
6
|
<% group.questions.each do |question| -%>
|
6
|
-
<li><b><%=h question.prompt %></b> <%=h user.all_answers_for(question).map(&:data).join(', ') %></li>
|
7
|
+
<li id="<%=h question.prompt.parameterize %>"><b><%=h question.prompt %></b> <%=h user.all_answers_for(question).map(&:data).join(', ') %></li>
|
7
8
|
<% end -%>
|
8
9
|
</ul>
|
9
10
|
<% end -%>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="census_questions">
|
2
2
|
<% DataGroup.all.each do |group| -%>
|
3
|
-
<fieldset>
|
3
|
+
<fieldset id="<%=h group.name.parameterize %>">
|
4
4
|
<legend><%=h group.name %></legend>
|
5
5
|
<% group.questions.each do |question| -%>
|
6
6
|
<%= render 'census/question_fields', :question => question, :user => user %>
|