Method: Post#my_index
- Defined in:
- app/models/post.rb
#my_index ⇒ Fixnum
Returns the index of this post in the blog’s collection of posts.
91 92 93 |
# File 'app/models/post.rb', line 91 def my_index self.blog.posts.published.to_a.index self end |