Skip to content

Fix empty array with default value validates #937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Fix empty array with default value validates #937

wants to merge 1 commit into from

Conversation

u2
Copy link
Contributor

@u2 u2 commented Feb 24, 2015

@dm1try
Copy link
Member

dm1try commented Feb 24, 2015

Hi @u2, thanks for looking into this issue.
Those changes do not fix the behavior if optional array is not provided

get '/optional_array_with_default_values' do
 { videos: params[:videos] }
end

it 'set nil for an optional array if it is not provided' do
  get('/optional_array_with_default_values')
  expect(last_response).to eq { { videos: nil }.to_json } # fails
end

see #936

@u2
Copy link
Contributor Author

u2 commented Feb 24, 2015

@dm1try Yes.

@dblock
Copy link
Member

dblock commented Feb 24, 2015

Closing in favor of #936, LMK if I am doing something wrong ;)

@dblock dblock closed this Feb 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants