active_record_survey_api 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 434cef59789f897cc5cd0d3c2da75393391f8672
4
- data.tar.gz: a243df204fcb37fa0a3bef01b9900f415cc5018a
3
+ metadata.gz: 3ec3565ac69da4b67aaec146c5c29c61040e4d16
4
+ data.tar.gz: 6243420ede300d5c338d109ff43c7afc79afce32
5
5
  SHA512:
6
- metadata.gz: bbb260c9e0d0645760a6df5e5a8cdc230f28b9ed29e897e03e6a070700973a4a0c910b67bde1ba5a171ced428eb3000890fbde417b23d4e74859464299ab3870
7
- data.tar.gz: ed268fe5eff2d6e1a72232c3ac5916d3c4ed119a1d13f22cb2baf428d5fb0eb04dc01e216e09a030c37667ffc2767bf1e3370dd5ca00e46ab854522cec86fa6d
6
+ metadata.gz: f387191415e9c496cd0956283e3b25252a08a47e1d8ec3c65fbd7a03a6951fbaa0b5eeef115f98ec084c5f4b3457b013d369f87dbef614e9b26f6cddd99668aa
7
+ data.tar.gz: f7b171d60cc6ea7e9d1fd803f3f5388279aade676afa345e01e1f168d1a1e19b515128a124f3dd55f55ca046da4ada63d5a9f092bdbf2d5f38f710c80c940fc1
@@ -47,7 +47,7 @@ module ActiveRecordSurveyApi
47
47
  def nodes
48
48
  @survey = survey_by_id(params[:survey_id])
49
49
 
50
- nodes = @survey.nodes
50
+ nodes = @survey.nodes.includes(:translations)
51
51
  questions = nodes.select { |i|
52
52
  i.class.ancestors.include?(::ActiveRecordSurvey::Node::Question)
53
53
  }
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordSurveyApi
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
@@ -20,8 +20,9 @@ describe ActiveRecordSurveyApi::SurveysController, :type => :controller, :survey
20
20
  get :edges, {
21
21
  :survey_id => survey.id
22
22
  }, @header_params.merge(:survey_id => survey.id, :HTTP_ACCEPT_LANGUAGE => 'en')
23
+ json_body = JSON.parse(response.body)
23
24
 
24
- #expect(response.body).to eq('[{"source":1,"target":2},{"source":2,"target":3},{"source":3,"target":4},{"source":4,"target":5},{"source":5,"target":6},{"source":5,"target":7},{"source":3,"target":8},{"source":8,"target":9},{"source":9,"target":10},{"source":10,"target":5},{"source":9,"target":11},{"source":11,"target":5},{"source":1,"target":12},{"source":12,"target":9},{"source":1,"target":13},{"source":13,"target":5}]')
25
+ expect(json_body.length).to eq(16)
25
26
  end
26
27
  end
27
28
 
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_survey_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Butch Marshall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-27 00:00:00.000000000 Z
11
+ date: 2016-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.1.45
47
+ version: 0.1.47
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.1.45
54
+ version: 0.1.47
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: active_record_survey-node_map_group
57
57
  requirement: !ruby/object:Gem::Requirement