# Adding more info to created\_by (from user and from user\_summary)

**URL:** https://meta.discourse.org/t/adding-more-info-to-created-by-from-user-and-from-user-summary/183608
**Category:** Marketplace
**Created:** [March 18, 2021, 2:12am UTC](https://meta.discourse.org/t/adding-more-info-to-created-by-from-user-and-from-user-summary/183608 "2021-03-18T02:12:04Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Mgcs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mgcs/32/202507_2.png) [@Mgcs](https://meta.discourse.org/u/Mgcs)
#### Post date: [March 18, 2021, 2:12am UTC](https://meta.discourse.org/t/adding-more-info-to-created-by-from-user-and-from-user-summary/183608/1 "2021-03-18T02:12:04Z")

</div>

Hi!

I’m trying to figure how to add more info to created\_by in a GET request to a topic ID.  
From what I could see, it uses BasicUserSerializer, which returns:

```
"created_by": {
  "id": 1,
  "username": "Name",
  "name": "Name",
  "avatar_template": "/user_avatar_url"
}

```

If I wanted to add other details, such as likes\_give, likes\_received, created\_at, and other relevant info from the topic OP, how would I do that?

I was looking at add\_to\_serializer and I’ve tried doing something like this, which fails and breaks every page:

```
#customization:plugin.rb
after_initialize do
  add_to_serializer(:basic_user, :created_at) do
    object.created_at
  end
end

```

Thanks!

---

<div class="post-metadata">

### Author: ![Mgcs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mgcs/32/202507_2.png) [@Mgcs](https://meta.discourse.org/u/Mgcs)
#### Post date: [March 22, 2021, 3:22am UTC](https://meta.discourse.org/t/adding-more-info-to-created-by-from-user-and-from-user-summary/183608/2 "2021-03-22T03:22:08Z")

</div>

Bumping this 🙂  
If you know how to solve this, talk to me, I can pay you for the info too. Send me a private message if that is better.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 22, 2021, 3:49am UTC](https://meta.discourse.org/t/adding-more-info-to-created-by-from-user-and-from-user-summary/183608/3 "2021-03-22T03:49:31Z")

</div>

probably cause it is not being selected, this is pretty complicated patch you are after, since this is for pay I think #Marketplace is a good spot.

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [March 22, 2021, 7:37am UTC](https://meta.discourse.org/t/adding-more-info-to-created-by-from-user-and-from-user-summary/183608/4 "2021-03-22T07:37:40Z")

</div>

> [@Mgcs](#):
>
> If you know how to solve this, talk to me, I can pay you for the info too. Send me a private message if that is better.

Cheers from [Pavilion](https://thepavilion.io/welcome)  
I’ve solved this, it is indeed complicated. I’ll send you a PM regarding this.

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [April 8, 2021, 5:54am UTC](https://meta.discourse.org/t/adding-more-info-to-created-by-from-user-and-from-user-summary/183608/5 "2021-04-08T05:54:58Z")

</div>

This task was completed and paid for promptly. Was nice working with @Mgcs

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 8, 2021, 5:55am UTC](https://meta.discourse.org/t/adding-more-info-to-created-by-from-user-and-from-user-summary/183608/6 "2021-05-08T05:55:47Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
