polyrex-createobject 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/polyrex-createobject.rb +2 -2
- metadata +1 -1
data/lib/polyrex-createobject.rb
CHANGED
@@ -18,7 +18,7 @@ class PolyrexCreateObject
|
|
18
18
|
|
19
19
|
@rpaths = (a.length).times.inject({}) {|r| r.merge ({a.join('/').gsub(/\[[^\]]+\]/,'') => a.pop}) }
|
20
20
|
names = @rpaths.to_a[0..-2].map {|k,v| [v[/[^\[]+/], k]}
|
21
|
-
|
21
|
+
|
22
22
|
attach_create_handlers(names)
|
23
23
|
|
24
24
|
end
|
@@ -42,7 +42,7 @@ class PolyrexCreateObject
|
|
42
42
|
|
43
43
|
methodx << %Q(
|
44
44
|
def #{name}(params={}, id=nil)
|
45
|
-
@parent_node = XPath.first(@parent_node.root,'records')
|
45
|
+
@parent_node = XPath.first(@parent_node.root,'//records')
|
46
46
|
record = create_node(@parent_node, @rpaths['#{xpath}'], params, id)
|
47
47
|
self
|
48
48
|
end
|