active_record_survey 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_record_survey/node/question.rb +7 -0
- data/lib/active_record_survey/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45a700c4e7c967a7e33e563cdc2b83c7365fb208
|
4
|
+
data.tar.gz: 3d35f6470c6f3bb23cb918bb16c7e6d7797cf503
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b2313a7cd9470fbe3c465aab20cc576b52a1dc3e12d4ec62dfb0fd9bed8a34dc2d9d53af4e5f434508712fa0b6da50537ebfce870998dfadbcc94fcf048122f
|
7
|
+
data.tar.gz: 2da42754aadab9576a19040e3658a65ef134965a725119293026cd4e0400998f634385eb3e5516b75ea360c3d3599bd2a57bf97d8ae7703b198c0473feae58ba
|
@@ -7,6 +7,13 @@ module ActiveRecordSurvey
|
|
7
7
|
}.include?(false)
|
8
8
|
end
|
9
9
|
|
10
|
+
# Returns the survey to the question
|
11
|
+
def survey
|
12
|
+
if node_map = self.node_maps.first
|
13
|
+
node_map.survey
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
10
17
|
# Build an answer off this node
|
11
18
|
def build_answer(answer_node, survey = nil)
|
12
19
|
survey = survey || self.node_maps.select { |i|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_survey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Butch Marshall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|