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

<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, 1:50pm UTC](https://meta.discourse.org/t/checking-if-post-or-thread-ruby/116437/2 "2019-04-30T13:50:16Z")

</div>

> [@jackkelly-bayliss](#):
>
> I have attempted to find it already with ‘post\_number’

That’s the right approach, but the first post in a topic has `post_number==1`, not `post_number==0`

---

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