active_record_survey 0.1.47 → 0.1.48

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: db7d02e98f6dcacb15e74ed15c1694adb8d7b989
4
- data.tar.gz: 21d3f34d72bd909c9cc7b0f55bb01bf426174668
3
+ metadata.gz: e80f1e61c2033324b9ff86b0baa996510fd715ca
4
+ data.tar.gz: c54065cd9fd75047dde99475e0c8ecfceaed3869
5
5
  SHA512:
6
- metadata.gz: d2f1460b9b14f498ea85882f229cc0f36d824f9e1bfbb41855fe908b59e91ac1b90ac76b69063b6ffcc47489eb0efe982e08d6f736a44813e344afdf399575c5
7
- data.tar.gz: 3a14f13f378178a83eb06328d6de351851430c32605e74043445035b9fc08e7153cc327893737effc140a58a758059b9d74183186da7fd10dc16b3805fa7230c
6
+ metadata.gz: 604a6b7d809abc8e93e999c3f406768d9e09826893a7a4b02d4f4ace3300d09124c31720e107b53d9553a9f2cab3ef1b70ddf811fb6123ece5370703d2b3b82e
7
+ data.tar.gz: a7cff9333be14be320b779101a68b0acdcf26c968740aa50719120702c9249cefbf1077f898d5df9a2949a3a5ce2cdc4e0d523d99d962b902fea5d4dd56cf197
@@ -5,6 +5,8 @@ module ActiveRecordSurvey
5
5
  has_many :nodes, :class_name => "ActiveRecordSurvey::Node", :foreign_key => :active_record_survey_id
6
6
  has_many :questions, :class_name => "ActiveRecordSurvey::Node::Question", :foreign_key => :active_record_survey_id
7
7
 
8
+ default_scope { includes(node_maps:[:node,parent:[:node]]) }
9
+
8
10
  def root_node
9
11
  self.node_maps.includes(:node).select { |i| i.depth === 0 }.first
10
12
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordSurvey
2
- VERSION = "0.1.47"
2
+ VERSION = "0.1.48"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_survey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.47
4
+ version: 0.1.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Butch Marshall