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
I'm struggling for days with the same thing.
I want to be able to pass Numbers and Dates to parse but it only sends Strings.
I managed to save a number field by adding @user.gender = params[:gender].to_i but no matter what number I send from the form, the parse database receives a 0.....
If you are talking about Rails, it might be a strong params issue.
@post.postid = post_params[:postid].to_i
That should work as long as you have the strong params options set correctly in the bottom of your controller. I think it becomes 0 because it's quietly failing.
It shouldn't look like this.
def post_params
params[:post]
end
It should look like this.
def post_params
params.require(:post).permit(:post_boolean, :title, :postid)
end
How can I define that the object is a pointer rather than a string.
No matter what I do, I get the following
111 invalid type for key menu, expected *Menu, but got string
The text was updated successfully, but these errors were encountered: