add recurring todos to export to yml and xml

This commit is contained in:
Reinier Balt 2008-09-05 17:41:30 +02:00
parent 1239a2cd61
commit 88159d3f6a

View file

@ -24,6 +24,7 @@ class DataController < ApplicationController
all_tables['tags'] = current_user.tags.find(:all) all_tables['tags'] = current_user.tags.find(:all)
all_tables['taggings'] = current_user.taggings.find(:all) all_tables['taggings'] = current_user.taggings.find(:all)
all_tables['notes'] = current_user.notes.find(:all) all_tables['notes'] = current_user.notes.find(:all)
all_tables['recurring_todos'] = current_user.recurring_todos.find(:all)
result = all_tables.to_yaml result = all_tables.to_yaml
result.gsub!(/\n/, "\r\n") # TODO: general functionality for line endings result.gsub!(/\n/, "\r\n") # TODO: general functionality for line endings
@ -81,6 +82,7 @@ class DataController < ApplicationController
result << current_user.tags.find(:all).to_xml(:skip_instruct => true) result << current_user.tags.find(:all).to_xml(:skip_instruct => true)
result << current_user.taggings.find(:all).to_xml(:skip_instruct => true) result << current_user.taggings.find(:all).to_xml(:skip_instruct => true)
result << current_user.notes.find(:all).to_xml(:skip_instruct => true) result << current_user.notes.find(:all).to_xml(:skip_instruct => true)
result << current_user.recurring_todos.find(:all).to_xml(:skip_instruct => true)
send_data(result, :filename => "tracks_backup.xml", :type => 'text/xml') send_data(result, :filename => "tracks_backup.xml", :type => 'text/xml')
end end