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:
1 parent
8524d505c5
commit
0e19aa4362
8 files changed
+45
-30
No files matched your search
@@ -6,11 +6,9 @@ api.array :projects do
|
||||
api.identifier project.identifier
|
||||
api.description project.description
|
||||
api.parent(:id => project.parent_id, :name => project.parent.name) unless project.parent.nil?
|
||||
api.array :custom_fields do
|
||||
project.visible_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 project.custom_field_values.empty?
|
||||
|
||||
render_api_custom_values project.visible_custom_field_values, api
|
||||
|
||||
api.created_on project.created_on
|
||||
api.updated_on project.updated_on
|
||||
end
|
||||
|
||||
@@ -5,11 +5,7 @@ api.project do
|
||||
api.description @project.description
|
||||
api.homepage @project.homepage
|
||||
|
||||
api.array :custom_fields do
|
||||
@project.visible_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 @project.custom_field_values.empty?
|
||||
render_api_custom_values @project.visible_custom_field_values, api
|
||||
|
||||
api.created_on @project.created_on
|
||||
api.updated_on @project.updated_on
|
||||
|
||||
Reference in new issue
Block a user