We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 990ee36 commit 0247f30Copy full SHA for 0247f30
README.md
@@ -35,11 +35,13 @@ If a model exists, but does not have a serializer it will be skipped
35
## Extra Attributes
36
In some cases you may want to allow attributes to be pushed to the API, but not serialized from the API. For instance
37
you need to push `user.password`, but you shouldn't have `password` in the user serializer. To include these
38
-private attributes simply add a line like this to your serializer class:
+private attributes simply add a method in your seralizer called `private_attributes`
39
40
```ruby
41
-#push_attr password:string
42
-#push_attr password_confirmation:string
+def private_attributes
+ ["password:string",
43
+ "password_confirmation:string"]
44
+end
45
```
46
47
## Usage
0 commit comments