# What is this code add\_to\_serializer in all these plugins

**URL:** <https://meta.discourse.org/t/what-is-this-code-add-to-serializer-in-all-these-plugins/58913>\
**Category:** Development\
**Created:** [March 12, 2017, 5:07am UTC](https://meta.discourse.org/t/what-is-this-code-add-to-serializer-in-all-these-plugins/58913 "2017-03-12T05:07:15Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [August 22, 2019, 9:47am UTC](https://meta.discourse.org/t/what-is-this-code-add-to-serializer-in-all-these-plugins/58913/9 "2019-08-22T09:47:18Z")

</div>

> [@fzngagan](#):
>
> in my main plugin file, I am doing
> 
> add\_to\_serializer(:basic\_category, :default\_tag){object.custom\_fields[“default\_tag”]}
> 
> My custom fields aren’t getting saved to the db.

does doing:

```plaintext
add_to_serializer(:basic_category, :default_tag, false ){object.custom_fields[“default_tag”]}

```

now work?

---

_[View the full topic](https://meta.discourse.org/t/what-is-this-code-add-to-serializer-in-all-these-plugins/58913)._
