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
Platform: Darwin Joshs-MacBook-Pro-2.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
Database: sqlite
Lux Version: 1.2.3
Node Version: v10.15.3
The guides for Controller#params seem to indicate that it is optional:
If you do not override this property all of the attributes specified in the Serializer that represents a Controller's resource. If the Serializer cannot be resolved, this property will default to an empty array.
However, this defaulting doesn't seem to be working for me.
The guides for
Controller#params
seem to indicate that it is optional:However, this defaulting doesn't seem to be working for me.
(Demo repo here: https://github.com/CodingItWrong/lux-test)
When I have the following Serializer and Controller with explicit params, I can successfully create a record with values passed in:
But if I remove
Controller#params
:Then upon POSTing a record I get empty
attributes
back:POST:
Response:
And if I GET
/restaurants/
I get null values for the attributes:The text was updated successfully, but these errors were encountered: