mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Push to_xml_params down to ApplicationController
This commit is contained in:
parent
98b188d1df
commit
8fe343cccc
3 changed files with 8 additions and 16 deletions
|
|
@ -256,4 +256,12 @@ class ApplicationController < ActionController::Base
|
|||
@z_index_counter = 500
|
||||
end
|
||||
|
||||
def to_xml_params
|
||||
if params[:limit_fields] == 'index'
|
||||
return [:only => [:id, :created_at, :updated_at, :completed_at] ]
|
||||
else
|
||||
return [:except => :user_id, :include => [:tags, :predecessors, :successors] ]
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -21,12 +21,4 @@ class CalendarController < ApplicationController
|
|||
}
|
||||
end
|
||||
end
|
||||
|
||||
def to_xml_params
|
||||
if params[:limit_fields] == 'index'
|
||||
return [:only => [:id, :created_at, :updated_at, :completed_at] ]
|
||||
else
|
||||
return [:except => :user_id, :include => [:tags, :predecessors, :successors] ]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -815,14 +815,6 @@ class TodosController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def to_xml_params
|
||||
if params[:limit_fields] == 'index'
|
||||
return [:only => [:id, :created_at, :updated_at, :completed_at] ]
|
||||
else
|
||||
return [:except => :user_id, :include => [:tags, :predecessors, :successors] ]
|
||||
end
|
||||
end
|
||||
|
||||
def get_todo_from_params
|
||||
# TODO: this was a :append_before but was removed to tune performance per
|
||||
# method. Reconsider re-enabling it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue