You are here: Forums Ask a Rails expert how to update xml file ...
Posted in Forums : Ask a Rails expert
Authority 0
Posting Rating 45
Sign in to rate this post
|
Hi i am trying to update xml file but it always write instead of update File.open(xml_file_descripation,”w”) do |outfile|
out_doc.write(xml_file_descripation, 0) |
Authority 62
Posting Rating 100
Sign in to rate this post
|
“w” starts writing at the beginning of the file. If you need to append something (I guess that’s what you mean with update), you’d have to use “a”. See for example here. |
Ask a Rails expert : json gem error
Ask a Rails expert : Problem with break
Ask a Rails expert : activesupport string first method error
Ask a Rails expert : url_for broken ?
Ask a Rails expert : map.routes.rb pls help
Ask a Rails expert : how to h tag in controller
Ask a Rails expert : Problem with Restful routing and partial form
Ask a Rails expert : will_paginate, search and ajax
Ask a Rails expert : Mass Deletes in Admin Section