You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 17, 2017. It is now read-only.
Rails & strong_parameters has no problem interpreting this and creating the data. However, due to the way the JSON request body is structured, Rails & strong_parameters simply just set the id and type fields.
This results in Rails not picking up on the added association, causing my after_add association callback not to trigger.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a line in one of my models that looks like this:
I am sending a POST request to my Rails endpoint with JSON like this:
Rails & strong_parameters has no problem interpreting this and creating the data. However, due to the way the JSON request body is structured, Rails & strong_parameters simply just set the
id
andtype
fields.This results in Rails not picking up on the added association, causing my
after_add
association callback not to trigger.The text was updated successfully, but these errors were encountered: