From e10cc2d6ad4ae7c755a6742e0b52a563d0b262bf Mon Sep 17 00:00:00 2001 From: Mohamed Wael Khobalatte Date: Mon, 2 Nov 2015 10:34:40 +0100 Subject: [PATCH] Pass project_id instead of project instance to version_attributes --- app/models/permitted_params.rb | 2 +- spec/models/permitted_params_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/permitted_params.rb b/app/models/permitted_params.rb index 653ae20cae..ad05eb5058 100644 --- a/app/models/permitted_params.rb +++ b/app/models/permitted_params.rb @@ -327,7 +327,7 @@ class PermittedParams :status, :sharing, :custom_field_value, - version_settings_attributes: [:id, :display, :project]) + version_settings_attributes: [:id, :display, :project_id]) end def comment diff --git a/spec/models/permitted_params_spec.rb b/spec/models/permitted_params_spec.rb index 3f60cda415..e55edf1ef4 100644 --- a/spec/models/permitted_params_spec.rb +++ b/spec/models/permitted_params_spec.rb @@ -254,7 +254,7 @@ describe PermittedParams, type: :model do acceptable_params_with_data.merge!(version_settings_attributes: {id: '1', display: '2', - project: '3'}) + project_id: '3'}) params = ActionController::Parameters.new(version: acceptable_params_with_data)