Ok, one more question... I can dump the database to xml by doing User.to_xml I''m wondering if I can save it to a .xml file. I''m having trouble finding documentation on this. Thanks!! -- Posted via http://www.ruby-forum.com/.
Can you even save files using Rails? I haven''t found a way to do it yet.... Thanks -- Posted via http://www.ruby-forum.com/.
Sam Purtill wrote:> Can you even save files using Rails? I haven''t found a way to do it > yet.... ThanksYou do anything in Rails the same way you''d do it with Ruby itself. In Rails, you probably have protected directories - you''ll need to unprotect the directories first so you can save files there. -- Posted via http://www.ruby-forum.com/.
Look up File.open. http://uic.rsu.ru/doc/programming/ruby/ProgrammingRuby/html/tut_io.html You can practice in script/console to get your syntax right. - dan -- Dan Kohn <mailto:dan@dankohn.com> <http://www.dankohn.com/> <tel:+1-415-233-1000> On Jul 25, 2006, at 1:07 AM, Sam Purtill wrote:> Can you even save files using Rails? I haven''t found a way to do it > yet.... Thanks > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails