Fixed: error when serializing back objects with custom fields using ActiveResource (#6403).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4480 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2010-12-10 10:12:19 +00:00
1 parent 8524d505c5
commit 0e19aa4362
8 files changed
+45 -30

No files matched your search

+1 -5
View File
@@ -19,11 +19,7 @@ api.array :issues do
api.done_ratio issue.done_ratio
api.estimated_hours issue.estimated_hours
api.array :custom_fields do
issue.custom_field_values.each do |custom_value|
api.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name
end
end
render_api_custom_values issue.custom_field_values, api
api.created_on issue.created_on
api.updated_on issue.updated_on
+1 -5
View File
@@ -20,11 +20,7 @@ api.issue do
api.spent_hours @issue.spent_hours
end
api.array :custom_fields do
@issue.custom_field_values.each do |custom_value|
api.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name
end
end unless @issue.custom_field_values.empty?
render_api_custom_values @issue.custom_field_values, api
api.created_on @issue.created_on
api.updated_on @issue.updated_on