# 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:** 17

<div class="post-metadata">

**Author:** ![Cyrine](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@Cyrine](https://meta.discourse.org/u/Cyrine)\
**Post date:** [August 22, 2020, 1:51pm UTC](https://meta.discourse.org/t/what-is-this-code-add-to-serializer-in-all-these-plugins/58913/17 "2020-08-22T13:51:09Z")

</div>

Hello, I have the same issue (custom\_fields are submitted in the js console, but are not getting saved to the db) I used the `add_to_serializer(:basic_category, :default_tag, false ){object.custom_fields[“default_tag”]}` way in my main plugin file.

Would you still reccomend this solution?

---

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