Method: Post#my_index

Defined in:
app/models/post.rb

#my_indexFixnum

Returns the index of this post in the blog’s collection of posts.

Returns:

  • (Fixnum)

    the path for this post



91
92
93
# File 'app/models/post.rb', line 91

def my_index
  self.blog.posts.published.to_a.index self
end