2

i am trying to post using postman to a rails api that i made, the actual request goes in and creates an entry, but nothing but the ID gets recorded. attached are the files for that. Get Request controller controllerparams post request

1 Answer 1

1

You need to pass the post params and not just the id into the list.new call and make sure you're sending up the correctly namespaced values in the post request.

Step 1.

In create you need to do

@list = List.new(list_params)

Step 2.

Postman needs to be putting all the params into the list[] namespace

ie. list[title] rather than just title.

Sign up to request clarification or add additional context in comments.

1 Comment

That made it, thank you!!! i had the list_params there before but it was giving me an error for an empty value. But this totally fixed it!!! Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.