Skip to content
Browse files

Add `Post#last`.

  • Loading branch information...
1 parent 9685411 commit 649b071f4f011a572702b7ad8aab6de414e8c9db @nathanaelkane nathanaelkane committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 app/models/post.rb
View
4 app/models/post.rb
@@ -119,6 +119,10 @@ def first
all.first
end
+ def last
+ all.last
+ end
+
def feed
all.first(10)
end

0 comments on commit 649b071

Please sign in to comment.
Something went wrong with that request. Please try again.