rename 'name' to 'subject' and 'end_date' in 'due_date' in planning_element api to be consistent

pull/485/head
Philipp Tessenow 11 years ago committed by Hagen Schink
parent a39da4c148
commit 1b9d578907
  1. 8
      app/helpers/planning_elements_helper.rb

@ -35,21 +35,21 @@ module PlanningElementsHelper
:identifier => planning_element.project.identifier,
:name => planning_element.project.name)
api.name(planning_element.subject)
api.subject(planning_element.subject)
api.description(planning_element.description)
api.start_date(planning_element.start_date.to_formatted_s(:db)) unless planning_element.start_date.nil?
api.end_date(planning_element.due_date.to_formatted_s(:db)) unless planning_element.due_date.nil?
api.due_date(planning_element.due_date.to_formatted_s(:db)) unless planning_element.due_date.nil?
if planning_element.parent
api.parent(:id => planning_element.parent_id, :name => planning_element.parent.subject)
api.parent(:id => planning_element.parent_id, :subject => planning_element.parent.subject)
end
if planning_element.children.present?
api.array(:children, :size => planning_element.children.size) do
planning_element.children.each do |child|
api.child(:id => child.id, :name => child.subject)
api.child(:id => child.id, :subject => child.subject)
end
end
end

Loading…
Cancel
Save