dynarex 0.9.7 → 0.9.8
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.
- data/lib/dynarex.rb +3 -3
- metadata +1 -1
data/lib/dynarex.rb
CHANGED
@@ -193,9 +193,9 @@ EOF
|
|
193
193
|
fields = capture_fields(params)
|
194
194
|
|
195
195
|
# for each field update each record field
|
196
|
-
record = @doc.element("records/#{@record_name}[@id
|
197
|
-
fields.each {|k,v| record.
|
198
|
-
record.add_attribute(
|
196
|
+
record = @doc.element("records/#{@record_name}[@id='#{id.to_s}']")
|
197
|
+
fields.each {|k,v| record.element(k.to_s).text = v if v}
|
198
|
+
record.add_attribute(last_modified: Time.now.to_s)
|
199
199
|
|
200
200
|
load_records
|
201
201
|
self
|