# Checking if post or thread - Ruby

**URL:** <https://meta.discourse.org/t/checking-if-post-or-thread-ruby/116437>\
**Category:** Development\
**Created:** [April 30, 2019, 1:37pm UTC](https://meta.discourse.org/t/checking-if-post-or-thread-ruby/116437 "2019-04-30T13:37:52Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [April 30, 2019, 5:04pm UTC](https://meta.discourse.org/t/checking-if-post-or-thread-ruby/116437/16 "2019-04-30T17:04:33Z")

</div>

Which user? The one who wrote the post?

If so, you can do `post.user.custom_fields["custom_field_name"]`

(replace `custom_field_name` with the custom field you want to access)

---

_[View the full topic](https://meta.discourse.org/t/checking-if-post-or-thread-ruby/116437)._
