Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Find last article (See related posts)

Add this to your Article model (or whatever you name it) to get the last published article on your site.

def Article.find_last
  Article.find(:first, :order => "created_at DESC")

You need to create an account or log in to post comments to this site.

Related Posts