mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +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
|
@z_index_counter = 500
|
||||||
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
|
end
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,4 @@ class CalendarController < ApplicationController
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
|
||||||
|
|
@ -815,14 +815,6 @@ class TodosController < ApplicationController
|
||||||
end
|
end
|
||||||
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
|
def get_todo_from_params
|
||||||
# TODO: this was a :append_before but was removed to tune performance per
|
# TODO: this was a :append_before but was removed to tune performance per
|
||||||
# method. Reconsider re-enabling it
|
# method. Reconsider re-enabling it
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue