polyrex-createobject 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/polyrex-createobject.rb +2 -2
  2. metadata +1 -1
@@ -31,7 +31,8 @@ class PolyrexCreateObject
31
31
  methodx = names[0..-2].map do |name, xpath|
32
32
  %Q(
33
33
  def #{name}(params)
34
- create_node(@parent_node, @rpaths['#{xpath}'], params)
34
+ records = XPath.first(@parent_node,'records')
35
+ create_node(records, @rpaths['#{xpath}'], params)
35
36
  self
36
37
  end
37
38
  )
@@ -43,7 +44,6 @@ class PolyrexCreateObject
43
44
  def #{name}(params)
44
45
  @parent_node = XPath.first(@doc.root,'records')
45
46
  record = create_node(@parent_node, @rpaths['#{xpath}'], params)
46
- @parent_node = XPath.first(record.root, 'records')
47
47
  self
48
48
  end
49
49
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyrex-createobject
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors: []
7
7