mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
add recurring todos to export to yml and xml
This commit is contained in:
parent
1239a2cd61
commit
88159d3f6a
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue