```ruby
class PostSerializer < BaseSerializer
  attributes :id, :title, :text, :published_at

  def id
    object.slug
  end
end
```

Add author name to the serializer
user
```ruby
class PostSerializer < BaseSerializer
  attributes :id, :title, :text, :published_at, :author_name

  def id
    object.slug
  end
end
```
assistant