mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-19 13:48:09 +01:00
add parameter to REST api for todos to limit result to active todos. Fixes #1388
This commit is contained in:
parent
4cde8ce78b
commit
595806be87
3 changed files with 27 additions and 2 deletions
|
|
@ -47,7 +47,10 @@ class TodosController < ApplicationController
|
|||
headers['Content-Type']=Mime::TEXT.to_s
|
||||
render :content_type => Mime::TEXT
|
||||
end
|
||||
format.xml { render :xml => @todos.to_xml( *todo_xml_params ) }
|
||||
format.xml do
|
||||
@xml_todos = params[:limit_to_active_todos] ? @not_done_todos : @todos
|
||||
render :xml => @xml_todos.to_xml( *todo_xml_params )
|
||||
end
|
||||
format.any(:rss, :atom) { @feed_title, @feed_description = 'Tracks Actions', "Actions for #{current_user.display_name}" }
|
||||
format.ics
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue